Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIan Thompson <quornian@googlemail.com>2008-08-06 17:46:44 +0400
committerIan Thompson <quornian@googlemail.com>2008-08-06 17:46:44 +0400
commit6c0f4660ed60ea8dd46519e3367ee5c0efdcf4f8 (patch)
treede0167eb5e5e09392121212816cca55a5b1cd9ac /release/scripts/textplugin_templates.py
parent799ba2c3517df4df6c8ddbd508af85fec77167df (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/scripts/textplugin_templates.py')
-rw-r--r--release/scripts/textplugin_templates.py5
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