[gedit] Fixed cursor going to end placeholder if there are no other placeholders
- From: Jesse van den Kieboom <jessevdk src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [gedit] Fixed cursor going to end placeholder if there are no other placeholders
- Date: Sat, 1 Aug 2009 19:22:59 +0000 (UTC)
commit 6efd048552f823a3def2efcf7c5504562e374bb9
Author: Jesse van den Kieboom <jesse icecrew nl>
Date: Sat Aug 1 21:22:35 2009 +0200
Fixed cursor going to end placeholder if there are no other placeholders
For instance, the 'main' snippet in the C language only defines an end
placeholder ($0). Upon activating the snippet, the cursor was not moved.
This has now been fixed.
plugins/snippets/snippets/Document.py | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/plugins/snippets/snippets/Document.py b/plugins/snippets/snippets/Document.py
index 16167d4..2f14736 100644
--- a/plugins/snippets/snippets/Document.py
+++ b/plugins/snippets/snippets/Document.py
@@ -501,7 +501,7 @@ class Document:
self.active_snippets.append(sn)
# Put cursor at first tab placeholder
- keys = filter(lambda x: x > 0, sn.placeholders.keys())
+ keys = filter(lambda x: x >= 0, sn.placeholders.keys())
if len(keys) == 0:
buf.place_cursor(sn.begin_iter())
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]