Skip to content
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

Stopped inputting text at v1.3.5 #14

Closed
shooftie opened this issue Mar 3, 2014 · 9 comments
Closed

Stopped inputting text at v1.3.5 #14

shooftie opened this issue Mar 3, 2014 · 9 comments

Comments

@shooftie
Copy link

shooftie commented Mar 3, 2014

All of a sudden the plugin stopped inserting the text...

No error logged in console...

Background to the input area lost it's dark background...

image

Reverted to 1.3.4 and it's working again...

Running ST2 on Windows 8...

@duydao
Copy link
Owner

duydao commented Mar 3, 2014

Hi, what command did you try to use?

@shooftie
Copy link
Author

shooftie commented Mar 3, 2014

[ctrl] + [alt] + n
foo bar
[enter]

Ah, just tried "\n" and noticed in the status bar, "No text found for InsertText, canceled"

@duydao
Copy link
Owner

duydao commented Mar 3, 2014

Thanks for the quick reply! There was a change in 1.3.5:

text insert will only be executed if we have a list of three or more words in it.

So atm, the threshold of words required to execute/insert text is 3. This was changed for future commands to work properly (in the next version). If you want to insert two words, please use the words command:

words foo bar

@duydao
Copy link
Owner

duydao commented Mar 3, 2014

  • Background of input field will be restored in 1.3.6
  • Option/Setting to change threshold to 2 in 1.3.6

@shooftie
Copy link
Author

shooftie commented Mar 3, 2014

Great... works fine now... and you managed to answer my next question with your last...

Many thanks, Issue closed?

@duydao
Copy link
Owner

duydao commented Mar 3, 2014

Yes, thanks for using Text Pastry!

@duydao duydao closed this as completed Mar 3, 2014
@duydao
Copy link
Owner

duydao commented Mar 3, 2014

I've just released 1.3.6, you can change the threshold by setting this in your TextPastry.sublime-settings file:

"insert_text_threshold": 3

Change this value to 2 to make "foo bar" work like in previous versions (without using the words command). You could even set it to 1 to restore the behaviour of Text Pastry to < 1.3.5

@shooftie
Copy link
Author

shooftie commented Mar 3, 2014

You mentioned that "This was changed for future commands to work property (in the next version)"... So how would

"insert_text_threshold": 3

affect these new features?

@duydao
Copy link
Owner

duydao commented Mar 3, 2014

To be honest, it shouldn't.

I've had the problem that TP couldn't distinct a command from a list of words, so if we would enter a command name (like uuid) and the command wasn't found, the string uuid was placed into the selection. Setting the threshold to 3 removed that problem, but 2 would've probably been enough.

I've further reduced the problem by using a lexer instead of a regular expression; so setting the threshold to 1 should be safe as well.

tl;dr: it shouldn't affect the new features in 1.4.0. As worst case, Text Pastry will put the text into our selections when the command was not found...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants