GTK only: The Insert Abbreviation dialog is not closed by pressing the Enter key inside the Abbreviation field.
GTK only: Pressing the Esc key inside the Insert Abbreviation dialog inserts the abbreviation that was inserted the last time. If you click the Cancel button in the dialog, then this problem disappears.
If you insert an abbreviation that contains a tab before the "|" character, the cursor will not be positioned correctly.
Try this abbreviation: test={\n\t|\n}
Try this abbreviation: test2=\t{\n\t\t|\n\t}
On a new line, press TAB 2 times, type "test2" and press Ctrl+B.
On a new line, press TAB 2 times, type "test", press TAB again, place the cursor after the word "test" and press Ctrl+B.
On a new line, press TAB 3 times, place the cursor before last tab, press Ctrl+Shift+R and insert the abbreviation "test".
There are multiple changes here and it would be better to separate some parts.
(1) and (2) appear to be causing all the changes to SciTEBase.h, SciTEGTK.cxx, SciTEWin.h, SciTEWinDlg.cxx, and the StartInsertAbbreviation removal and IDM_INS_ABBREV case in SciTEBase.cxx. These are reasonably straightforward.
There's no rationale for removing wEditor.Cancel() in IDM_INS_ABBREV. Autocompletion lists and other Scintilla modes could cause problems so they are cancelled before abbreviation expansion.
Committed the changes for (1) and (2) as [ba4b73].
That leaves the attached patch containing the changes to PerformInsertAbbreviation and StartExpandAbbreviation for later consideration.
Related
Commit: [ba4b73]
The new PerformInsertAbbreviation doesn't preserve selected text like the old version and one of the temporary '|' survives. With the abbreviation:
Type "more", select it then InsertAbbreviation | ff. The old version produced
The changed version produces
This error occurs when the caret position is not explicitly specified in the abbreviation. Fixed.
Committed as [c30553] with a minor change making selStart const to avoid a warning from MSVC code analysis.
Related
Commit: [c30553]
Committed as [c30553] with a minor change making selStart const to avoid a warning from MSVC code analysis.
Related
Commit: [c30553]