Branch: refs/heads/master
Author: Enrico Tröger <enrico.troeger(a)uvena.de>
Committer: Enrico Tröger <enrico.troeger(a)uvena.de>
Date: Wed, 12 Sep 2012 17:29:21
Commit: baafa6325c344bbc2c2370835c9be6968d1a4a67
https://github.com/geany/geany/commit/baafa6325c344bbc2c2370835c9be6968d1a4…
Log Message:
-----------
Strip more tags which start with a keyword
Modified Paths:
--------------
scripts/create_py_tags.py
Modified: scripts/create_py_tags.py
19 files changed, 12 insertions(+), 7 deletions(-)
===================================================================
@@ -142,13 +142,8 @@ def _add_tag(self, obj, tag_type, parent=''):
# skip short tags
return
tag = '%s%s%s%s%s%s\n' % (tagname, TA_TYPE, tag_type, TA_ARGLIST, args, scope)
- for keyword in PYTHON_KEYWORDS:
- # ignore tags which start with a keyword to avoid
- # annoying completions of 'pass_' and similar ones
- if tagname.startswith(keyword):
- return
- if not tagname in self.tags:
+ if not tagname in self.tags and not tagname_is_like_keyword(tagname):
self.tags[tagname] = tag
#----------------------------------------------------------------------
@@ -206,7 +201,7 @@ def process_file(self, filename):
tag_type = TYPE_FUNCTION
args = args.strip()
tag = '%s%s%s%s%s\n' % (tagname, TA_TYPE, tag_type, TA_ARGLIST, args)
- if not tagname in self.tags:
+ if not tagname in self.tags and not tagname_is_like_keyword(tagname):
self.tags[tagname] = tag
filep.close()
@@ -248,6 +243,16 @@ def write_to_file(self, filename):
#----------------------------------------------------------------------
+def tagname_is_like_keyword(tagname):
+ """ignore tags which start with a keyword to avoid annoying completions of 'pass_' and similar ones"""
+ # this is not really efficient but in this script speed doesn't really matter
+ for keyword in PYTHON_KEYWORDS:
+ if tagname.startswith(keyword):
+ return True
+ return False
+
+
+#----------------------------------------------------------------------
def is_private_identifier(tagname):
return tagname.startswith('_') or tagname.endswith('_')
@@ Diff output truncated at 100000 characters. @@
--------------
This E-Mail was brought to you by github_commit_mail.py (Source: TBD).
Branch: refs/heads/master
Author: Nick Treleaven <nick.treleaven(a)btinternet.com>
Committer: Nick Treleaven <nick.treleaven(a)btinternet.com>
Date: Wed, 05 Sep 2012 16:13:34
Commit: 00714db69c3ce8f8ba2d40be62c596045f1001d7
https://github.com/geany/geany/commit/00714db69c3ce8f8ba2d40be62c596045f100…
Log Message:
-----------
Improve collapsing fold behaviour when start point is offscreen
When collapsing a fold range whose starting line is offscreen,
scroll the starting line to display at the top of the view.
Otherwise it can be confusing when the document scrolls down to hide
the folded lines.
Modified Paths:
--------------
src/editor.c
src/sciwrappers.c
Modified: src/editor.c
13 files changed, 13 insertions(+), 0 deletions(-)
===================================================================
@@ -444,7 +444,20 @@ void editor_toggle_fold(GeanyEditor *editor, gint line, gint modifiers)
g_return_if_fail(editor != NULL);
sci = editor->sci;
+ /* When collapsing a fold range whose starting line is offscreen,
+ * scroll the starting line to display at the top of the view.
+ * Otherwise it can be confusing when the document scrolls down to hide
+ * the folded lines. */
+ if ((sci_get_fold_level(sci, line) & SC_FOLDLEVELNUMBERMASK) > SC_FOLDLEVELBASE &&
+ !(sci_get_fold_level(sci, line) & SC_FOLDLEVELHEADERFLAG))
+ {
+ gint parent = sci_get_fold_parent(sci, line);
+ gint first = sci_get_first_visible_line(sci);
+ parent = SSM(sci, SCI_VISIBLEFROMDOCLINE, parent, 0);
+ if (first > parent)
+ SSM(sci, SCI_SETFIRSTVISIBLELINE, parent, 0);
+ }
sci_toggle_fold(sci, line);
/* extra toggling of child fold points
Modified: src/sciwrappers.c
2 files changed, 1 insertions(+), 1 deletions(-)
===================================================================
@@ -682,7 +682,7 @@ gint sci_get_fold_parent(ScintillaObject *sci, gint start_line)
void sci_toggle_fold(ScintillaObject *sci, gint line)
{
- SSM(sci, SCI_TOGGLEFOLD, (uptr_t) line, 1);
+ SSM(sci, SCI_TOGGLEFOLD, (uptr_t) line, 0);
}
@@ Diff output truncated at 100000 characters. @@
--------------
This E-Mail was brought to you by github_commit_mail.py (Source: TBD).