Branch: refs/heads/master Author: Colomban Wendling ban@herbesfolles.org Committer: Colomban Wendling ban@herbesfolles.org Date: Mon, 17 Sep 2012 12:44:33 Commit: afb1eaaa0186d60723de40ad32ecc14b9267fe69 https://github.com/geany/geany/commit/afb1eaaa0186d60723de40ad32ecc14b9267fe...
Log Message: ----------- Remove improper caching of the current function
The code assumed that if both old and new fold levels were above the minimal function fold level the function couldn't have been changed, which is wrong if a function can appear both inside and outside another fold level (e.g. inside or outside a class).
Modified Paths: -------------- src/symbols.c
Modified: src/symbols.c 11 files changed, 2 insertions(+), 9 deletions(-) =================================================================== @@ -1979,15 +1979,8 @@ static gboolean current_function_changed(GeanyDocument *doc, gint cur_line, gint /* if the line has only changed by 1 */ if (abs(cur_line - old_line) == 1) { - const gint fn_fold = - get_function_fold_number(doc); - /* It's the same function if the fold number hasn't changed, or both the new - * and old fold numbers are above the function fold number. */ - gboolean same = - fold_num == old_fold_num || - (old_fold_num > fn_fold && fold_num > fn_fold); - - ret = ! same; + /* It's the same function if the fold number hasn't changed */ + ret = (fold_num != old_fold_num); } else ret = TRUE; }
@@ Diff output truncated at 100000 characters. @@
-------------- This E-Mail was brought to you by github_commit_mail.py (Source: TBD).