-
Notifications
You must be signed in to change notification settings - Fork 46
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Sublime command palette inserts numbers one space before the cursor #16
Comments
I just tried this on my system and it works as expected — with the keyboard shortcut, the numbers are inserted before the semicolon, with no extraneous white space, like in your fourth example. This is with SublimeText 3 (Build 3061) and Text Pastry 1.3.5 on an OS X 10.9.2 machine. |
Looks like this may be an interaction with the Vintage plugin. I was able to catch that opening the Text-Pastry command line via the Sublime command palette forces Vintage out of So when the editor is in
Debug output:
Opening the Text-Pastry command line from the Sublime command palette then bumps the editor into
I should note that commands like I'm on ST3 build 3059 on various Win 7 and Linux machines, same configuration and same behavior for all. |
I'm unfamiliar with the vintage plugin, but I'll take a look. Does this also happen with an other plugin? |
@ bseymore thanks for the quick check! |
Whoops, I got my plugin names mixed up. Vintage and Vintageous are Vim emulator plugins. I meant to say Vintageous previously. Vintage ships with Sublime Text 3 but is an ignored package in the default config. It's enabled by removing it from the ignored packages list. I enabled this plugin and it does seem to work correctly with Text-Pastry. Vintageous is a rewrite of Vintage; they should not be enabled at the same time. With this plugin enabled, the undesired behavior returns. Based on this, it looks like the bug may be due to Vintageous changing the cursor mode when the Sublime command palette is opened. It just so happens that I noticed the bug because I do frequent text insertion with Text-Pastry this way, making it appear like it was the plugin at fault. |
OK, thanks for clarifying! |
I'll take another look at this |
@amclain I tried to reproduce this bug, but it worked as expected. can you confirm that this still is a problem? Steps
Result
Note |
@amclain I was able to reproduce this problem, checking for a workaround |
relevant lines in vintageous are: |
Basically, vintageous will reset its mode to "normal mode" after losing focus. I've asked the creator of vintageous to add an option to enable/disable this behaviour. Can't do anything else, sorry. |
Thanks for tracking down the lines of code in Vintageous that were causing the problem! I understand this is their problem and not yours, but what you were able to find looks like a big help. |
Hi Bro, sequence i or \i (not work -- generate only "i"). it worked in the past, can u tell me why? :]] Scr: http://files.rjwebdesign.cz/i/20150120-151153---1487x1028---t---pn.png S pozdravem Roman Janko gsm: [+420] 777 856 657 Rjwebdesign logo Dne 7.6.2014 v 18:01 Duy Dao napsal(a):
|
Thanks for reporting this issue, I've created #27 for this bug |
There seems to be a bug when using Sublime's command palette to insert numbers. When the command is executed, the numbers are inserted one character behind the cursor. This does not seem to be the case if the Text-Pastry command line is used directly.
Given the following segment of code as an example, the goal is to insert a number before the semicolon:
constant_1 = 101;
So the first step is to position multiple cursors (illustrated wtih
|
) just before the semicolon, just as you would if you were to start typing more text. Although this may appear obvious, I state it because it is an important issue regarding the bug.Open Sublime's command palette via
ctrl + shift + p
, selectText Pastry: Command Line
, and enter\i101
. The inserted numbers end up behind the cursor location.Running the same command by opening the Text-Pastry command line directly with the respective hotkey (not through Sublime's command palette) works as expected.
The text was updated successfully, but these errors were encountered: