Bug 256014 - Allow one script trigger to be a prefix of another
Summary: Allow one script trigger to be a prefix of another
Status: REPORTED
Alias: None
Product: kile
Classification: Applications
Component: general (other bugs)
Version First Reported In: 2.0.85
Platform: openSUSE Linux
: NOR wishlist
Target Milestone: ---
Assignee: Michel Ludwig
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-11-04 03:50 UTC by Misha Aizatulin
Modified: 2019-10-17 22:19 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Misha Aizatulin 2010-11-04 03:50:22 UTC
Version:           2.0.85 (using KDE 4.4.4) 
OS:                Linux

I am using Kile scripts for autocompletion: Entering "{" results in input of "{}" with (very importantly!) cursor being placed between the braces. The same way I would like entering "\{" to produce "\{\}" with the cursor placed in the middle. Unfortunately, right now this is not possible - the shorter sequence always takes precedence. My suggestion would be to reverse the rule and allow the longer (more specific) sequence to be tried first.

Reproducible: Always

Steps to Reproduce:
Add two scripts:

var doc = kile.currentTextDocument();
doc.insertText("{}");
var i = doc.cursorColumn();
doc.setCursorColumn(i - 1);

and 

var doc = kile.currentTextDocument();
doc.insertText("\{\}");
var i = doc.cursorColumn();
doc.setCursorColumn(i - 2);

Assign the trigger "{" to the first one and the trigger "\{" to the second one. Now type "\{". 

Actual Results:  
\{}

Expected Results:  
\{\}
Comment 1 Misha Aizatulin 2019-10-17 22:19:07 UTC
Looks like this is still an issue with 2.9.92.

In fact, now the issue is worse -  neither "\{" nor "\\{" as triggers work at all, I presume due to it being confused about escaping.