I have been running with this PR for some time. I’m not a heavy user of snippets, but I do use a few.
I also tested this PR specifically, under Linux GTK+2, Linux GTK+3, and Windows GTK+2. Things like:
Bug: when the cursor is on or after the last cursor position (ellipsis), pressing the “Move cursor in snippet” keybinding moves the cursor to the end of the document. In more detail:
for
, and press the “Complete snippet” keybinding. The snippet expands, and the cursor jumps to inside the parentheses in xrange(…)
.Bug: when the cursor is at the beginning of the document, and there’s an ellipsis right there, pressing the “Move cursor in snippet” keybinding skips that ellipsis and selects the following run of text instead. In more detail:
Define a snippet like this:
[Default]
test=%cursor% something
Open an empty document.
Type test
and press the “Complete snippet” keybinding. The snippet expands to … something
.
Press Home to move the cursor to the beginning.
Press the “Move cursor in snippet” keybinding. The …
should be selected, but instead something
is selected.
Consider the main change this PR brings. Previously, cursor positions were invisible and transient. Now, they are marked with an ellipsis (as can be seen on Thomas’s screenshot), which is literally inserted into the document. It looks nice, but might have unintended side effects.
Try this:
Open an empty (but existing) Python file.
Type def
and press the “Complete snippet” keybinding. The document now contains:
def … (…):
""" Function doc """
On Windows, this “function” actually appears in the sidebar’s Symbols pane, with a placeholder name that looks like ⛝, and at the same time, a warning is printed to the console:
Pango: Invalid UTF-8 string passed to pango_layout_set_text()
On Linux, nothing appears in the Symbols pane, but another warning is printed:
geany: Warning: ignoring null tag in /home/vasiliy/tmp/untitled.py
This may or may not be a problem. You could as well type funny Unicode stuff manually into the document...
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub, or mute the thread.