Sublime Forum

Dev Build 3155

#11

How do we invoke the stand alone syntax test runner please? :slight_smile:

1 Like

#12

Binding the show_overlay command with the text arg still selects all the inserted text when opened.

  { "keys": ["ctrl+alt+s"], "command": "show_overlay",
    "args": {"overlay": "command_palette", "text": "Set Syntax: "} },

This is pretty annoying for bindings like the above.

0 Likes

#13

Here’s a video of it happening.

I invoke it with the keyboard, then focus the view/buffer behind with the mouse, then refocus the palette using the keyboard shortcut. Then, you don’t even see the cursor in the palette’s textarea. If you try to type some keys, you will see nothing happening. But if you re-open it, you will see what you typed previously and the textarea will still seem frozen, ie. no cursor displayed, no new keystroke appearing.

Also, in the video, you can see that the palette moves like 1 pixel to the left every time I open it and then begin typing.

0 Likes

#14

That is correct. The first time it is called to see if the command will return an input handler. If not, the command palette will not be used. We don’t want to open the command palette unless we know it will be used.

If it does handle input and is present in the command palette list of commands, then we invoke the command palette and tell it to pre-select the command with the args that have been provided. Those are then passed to create the actual input handler that it used to prompt the user for the remaining input.

It sounds like we are being a little inconsistent in that the console invocation is passing None the first time.

In terms of the text command being invoked on the console input text area, I’m not sure if I’d consider that a bug or not. I suppose that it only happens sometime is a bug, but in general I would expect that text commands should apply to pretty much any text area.

0 Likes

#15

There is a standalone .tar.bz2 that I will document the location of today. I’ll be working on getting it set up to run via Travis CI for pull requests on https://github.com/sublimehq/Packages. The syntax test runner is only available for Linux x64. If you create a Data folder next to the executable and extract the Packages repo inside of Data/, then it will find those when you invoke ./syntax_tests.

A few diagnostic messages are printed to stdout, but any other output from the executable is written to stderr. This includes assertion failures, warnings and errors. If anything is written to stderr, the executable will set the return code to 1 to signal a failure.

2 Likes

#16

I can confirm that this fixed the issue I was having with the template syntax. Thanks a lot!

0 Likes

#17

I would still have to trigger sublime commands that use the new InputHandler classes with run_command, keyboard shortcuts etc!

For example, window.run_command("rename_file", {'new_name': "test.py"}) works as expected but window.run_command("rename_file") throws an error: missing 1 required positional argument: 'new_name'

window.run_command("rename_file") should open the input dialog. That would make the new API more useful.

0 Likes

#18

It will, if the command defines an input() method that generates an input handler, and the command is listed in the command palette.


I just tested this out. The issue is that when invoked from the command palette build 3155 passes args as None when checking to see if the command handles input, which breaks the line if "new_name" not in args:. I’ll get this fixed for the next build.

2 Likes

#19

and I can reproduce OdatNurd’s issue on Linux 64.

0 Likes

#20

I’ve gotten the arrow key bug, text preselection and None args bugs fixed. I am looking into the focus issue right now.

2 Likes

#21

Thanks, looks good to me and fine in distraction free mode.

They don’t on Linux 64 and work perfectly just as they did before 3154.

0 Likes

#22

I thought that might be the case, but I was a bit thrown by how it was sometimes a dict and sometimes None so it seemed like a good idea to point it out.

On the one hand it would be nice if there was a way for the input() method to know that it’s really just being asked “would you provide input in this case?” so that it wouldn’t have to do whatever work it’s doing to create the input handler and any data it might require.

On the other hand, I assume the implication of it being invoked from the command palette in response to a user action would be that it should spend as little time as possible so it doesn’t block the UI, so that’s not really an issue.

Yeah, I thought much the same thing as I was writing that. I wouldn’t have even included it except that after I tested to see if the same thing happens for non TextCommand commands it stopped doing it altogether. I still can’t replicate it doing that, unfortunately.

0 Likes

#23

I too on Win10 Pro x64 1709 with 64bit sublime 3155.

0 Likes

#24

This build has tossed my unsaved “~/Library/Application Support/Sublime Text 3/Local/Session.sublime_session” which caused many of my unsaved drafts (important ones) to be lost.

Any other location where I might find unsaved tabs? Seriously pissed if my tabs are gone. They’ve always survived updates to newer builds.

0 Likes

#25

Nevermind, recovered via Time Machine. But this was utter bullshit.

0 Likes

#26

If you want stable, don’t use the dev branch. There is absolutely no reason to assume that the dev branch is going to be free bugs, even critical ones. Wait for the next beta.

2 Likes

#27

Thanks for this latest version, however there is this one annoying bug which has been nagging me for a few releases now. In Latex (no plugins), when opening a brace, the closing brace gets automatically inserted, but at a super weird position. I don’t know what the reason is, but it keeps breaking my builds. Anyone one else having this problem or a work-around?

0 Likes

#28

@wbond

I like the new arithmetic plugin, but it doesn’t always work as I expect it to.
I was editing some markdown, and I had an unsorted list like

* bla
* bla
* bla bla
* bla bla bla

I wanted to replace the unsorted list with a sorted list, so I select all stars and call arithmetic.
By entering “i.”, I’d expect the stars to be replaced with. If that’s too much, something more pythonic like str(i) + “.” would also be ok, but that doesn’t work either.

1. bla
2. bla
3. bla bla
4. bla bla bla

Unfortunately, does nothing at all.

Here’s a gif showing the behavior.

(also note that halfway through the gif, the arithmetic box gets deleted halfway, I was using ctrl+backspace)

I’m on Windows 10, Sublime build is 3155. There are no errors in the `ctrl+`` debugging view.

0 Likes

#29

I am not sure about sorting, if you want to replace asterisks with numbers see below

I deleted asterisks before performing arithmetic

4 Likes

#30

I don’t have that problem when I write LaTeX, but I’m using LaTeXTools… give the package a try!

0 Likes