diff options
author | Ian Thompson <quornian@googlemail.com> | 2008-08-06 17:46:44 +0400 |
---|---|---|
committer | Ian Thompson <quornian@googlemail.com> | 2008-08-06 17:46:44 +0400 |
commit | 6c0f4660ed60ea8dd46519e3367ee5c0efdcf4f8 (patch) | |
tree | de0167eb5e5e09392121212816cca55a5b1cd9ac /release | |
parent | 799ba2c3517df4df6c8ddbd508af85fec77167df (diff) |
Various UI drawing and event tweaks to make markers feel more natural and avoid getting in the way. If there is a marker under the cursor, ESC will remove it and others in its group. Otherwise all temporary markers are removed. Tab finds/cycles/removes temp. markers, cycles non-temp. markers (under cursor) and behaves normally in all other cases.
Diffstat (limited to 'release')
-rw-r--r-- | release/scripts/textplugin_templates.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/release/scripts/textplugin_templates.py b/release/scripts/textplugin_templates.py index e0e7746abca..0cd772f863e 100644 --- a/release/scripts/textplugin_templates.py +++ b/release/scripts/textplugin_templates.py @@ -48,9 +48,10 @@ def main(): if not txt: return - line, c = current_line(txt) + row, c = txt.getCursorPos() + line = txt.asLines()[row] indent=0 - while indent<len(line) and (line[indent]==' ' or line[indent]=='\t'): + while indent<c and (line[indent]==' ' or line[indent]=='\t'): indent += 1 # Check we are in a normal context |