InsertAbbreviation does not work properly, unlike the function ExpandAbbreviation.
InsertAbbreviation ignores the selection and incorrect positioning the cursor.
InsertAbbreviation invented not Neil but temporary author.
This author is gone. Nobody wants to be responsible for others' mistakes.
I was waiting for that fix will be included in the 2.25 ...
But probably this bug SciTE will last forever :(
--
mozers
<http://scite.net.ru>
> InsertAbbreviation invented not Neil but temporary author.
It was in change set 1359 with changes in 1892 (and some more
smaller) from Jakub Vrána with this explanation:
3. Sometimes, it is useful to have a chance to insert abbreviation in
a different way than from editor. E.g. if I have some text and I want
to insert abbreviation just after this text. Here is an example:
abbreviation: b=<B>|</B>
I want to write some part<B>ially</B> bolded text.
This is quite stupid example, but I use abbreviations also for e.g.
escaping from string ("'+|+'" in JS) and I needed it couple of times.
So I have added dialog by which you can insert abbreviation. This
dialog also works with selections - if something is selected,
abbreviation containing caret mark '|' is surrounded around the
selection. If there are two caret marks in the abbreviation, the
second one is used for selection and the caret is placed at the first
one. This is extremely useful for HTML tags (e.g. <a href="|">|</a>).
I bind this dialog to Ctrl+Shift+R. A little reasonable should be
Ctrl+Shift+B, but users already use it for Box comment.
Neil
> It was in change set 1359 with changes in 1892 (and some more
> smaller) from Jakub Vr�na
This author has implemented a useful idea.
I like it.
But Neo was talking about a particular bug with cursor positioning.
Neil, you accept the fix?
--
mozers
<http://scite.net.ru>
The expected behaviour is for the selection to be at the end of the
inserted abbreviation when there is no '|'. This matches Expand
Abbreviation.
Neil
> I did not propose, but have just assumed.
Yes, then mozers proposed: "Neil, you accept the fix?".
> In order to keep cursor at
> the end, that part of the code fragment need to be removed since it
> makes no sense.
I can't make sense of it either.
Now that 2.25 is released I have removed that code. Anyone
interested in testing this feature can download from Hg so any
regressions can be found before 2.26.
Neil