Branch: refs/heads/master
Author: Enrico Tröger <enrico.troeger(a)uvena.de>
Committer: Enrico Tröger <enrico.troeger(a)uvena.de>
Date: Sun, 07 Feb 2016 15:25:15 UTC
Commit: 9a5bde2e5e1d1145852d94b9e5b2794a1613ef76
https://github.com/geany/geany-plugins/commit/9a5bde2e5e1d1145852d94b9e5b27…
Log Message:
-----------
Fix checking multiple lines at once
We need to actually increase the line number when checking multiple
lines, e.g. after pasting some text. Before we checked the same line
again and again.
Modified Paths:
--------------
spellcheck/src/gui.c
Modified: spellcheck/src/gui.c
1 lines changed, 1 insertions(+), 0 deletions(-)
===================================================================
@@ -517,6 +517,7 @@ static gboolean check_lines(gpointer data)
msgwin_switch_tab(MSG_MESSAGE, FALSE);
}
g_free(line);
+ line_number++;
}
}
check_line_data.check_while_typing_idle_source_id = 0;
--------------
This E-Mail was brought to you by github_commit_mail.py (Source: https://github.com/geany/infrastructure).
Branch: refs/heads/master
Author: Enrico Tröger <enrico.troeger(a)uvena.de>
Committer: Enrico Tröger <enrico.troeger(a)uvena.de>
Date: Sun, 07 Feb 2016 15:08:51 UTC
Commit: 8d4db7f938b9a80c0aba1216e11173029fb143f1
https://github.com/geany/geany-plugins/commit/8d4db7f938b9a80c0aba1216e1117…
Log Message:
-----------
Fix double checking when 'check while typing' is activated
Before the check was performed even if a timeout callback was
set and so the current line was checked immediately and after
the timeout again.
Modified Paths:
--------------
spellcheck/src/gui.c
Modified: spellcheck/src/gui.c
5 lines changed, 4 insertions(+), 1 deletions(-)
===================================================================
@@ -530,6 +530,8 @@ static gboolean need_delay(void)
gint64 time_now;
GTimeVal t;
const gint timeout = 500; /* delay in milliseconds */
+ gboolean ret = FALSE;
+
g_get_current_time(&t);
time_now = ((gint64) t.tv_sec * G_USEC_PER_SEC) + t.tv_usec;
@@ -542,12 +544,13 @@ static gboolean need_delay(void)
{
check_line_data.check_while_typing_idle_source_id =
plugin_timeout_add(geany_plugin, timeout, check_lines, NULL);
+ ret = TRUE;
}
/* set current time for the next key press */
time_prev = time_now;
- return FALSE;
+ return ret;
}
--------------
This E-Mail was brought to you by github_commit_mail.py (Source: https://github.com/geany/infrastructure).
Branch: refs/heads/master
Author: Enrico Tröger <enrico.troeger(a)uvena.de>
Committer: Enrico Tröger <enrico.troeger(a)uvena.de>
Date: Sun, 07 Feb 2016 14:55:30 UTC
Commit: f88ac54fcc2c12950ac50ac8b8d91d4e6bf6078b
https://github.com/geany/geany-plugins/commit/f88ac54fcc2c12950ac50ac8b8d91…
Log Message:
-----------
Fix multiple typos in comments
Modified Paths:
--------------
spellcheck/src/gui.c
Modified: spellcheck/src/gui.c
6 lines changed, 3 insertions(+), 3 deletions(-)
===================================================================
@@ -557,15 +557,15 @@ static void check_on_text_changed(GeanyDocument *doc, gint position, gint lines_
gint line_count;
/* Iterating over all lines which changed as indicated by lines_added. lines_added is 0
- * if only a lines has changed, in this case set it to 1. Otherwise, iterating over all
+ * if only one line has changed, in this case set line_count to 1. Otherwise, iterating over all
* new lines makes spell checking work for pasted text. */
line_count = MAX(1, lines_added);
line_number = sci_get_line_from_position(doc->editor->sci, position);
/* TODO: storing these information in the global check_line_data struct isn't that good.
- * The data gets overwritten when a new line is inserted and so there is a chance that thep
+ * The data gets overwritten when a new line is inserted and so there is a chance that the
* previous line is not checked to the end. One solution could be to simple maintain a list
- * of line numbers which needs to be checked and do this is the timeout handler. */
+ * of line numbers which needs to be checked and do this in the timeout handler. */
check_line_data.doc = doc;
check_line_data.line_number = line_number;
check_line_data.line_count = line_count;
--------------
This E-Mail was brought to you by github_commit_mail.py (Source: https://github.com/geany/infrastructure).