Branch: refs/heads/master Author: Colomban Wendling ban@herbesfolles.org Committer: Colomban Wendling ban@herbesfolles.org Date: Mon, 04 Jan 2016 21:21:19 UTC Commit: ffde79e8ef1d91dc7de3c793c34373e33e5cc9a1 https://github.com/geany/geany/commit/ffde79e8ef1d91dc7de3c793c34373e33e5cc9...
Log Message: ----------- reflow: Don't split right before a whitespace
Avoid splitting lines right before a whitespace when reflowing (e.g. in case of several consecutive ones) not to move whitespaces at the start of the next line, which, while they will be removed later on, can lead to incorrect reflow width and even fully empty lines. Prefer leave trailing spaces then, which is less of a problem.
Modified Paths: -------------- src/keybindings.c
Modified: src/keybindings.c 6 lines changed, 5 insertions(+), 1 deletions(-) =================================================================== @@ -2244,7 +2244,11 @@ static gint split_line(GeanyEditor *editor, gint column) } } } - if (!found) + /* don't split right before a space */ + while (pos + 1 <= lend && sci_get_char_at(sci, pos + 1) == GDK_space) + pos++; + + if (!found || pos >= lend) break;
sci_insert_text(sci, pos + 1, editor_get_eol_char(editor));
-------------- This E-Mail was brought to you by github_commit_mail.py (Source: https://github.com/geany/infrastructure).