[geany/geany-plugins] 8d4db7: Fix double checking when 'check while typing' is activated
Enrico Tröger
git-noreply at xxxxx
Sun Feb 7 15:08:51 UTC 2016
Branch: refs/heads/master
Author: Enrico Tröger <enrico.troeger at uvena.de>
Committer: Enrico Tröger <enrico.troeger at uvena.de>
Date: Sun, 07 Feb 2016 15:08:51 UTC
Commit: 8d4db7f938b9a80c0aba1216e11173029fb143f1
https://github.com/geany/geany-plugins/commit/8d4db7f938b9a80c0aba1216e11173029fb143f1
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).
More information about the Plugins-Commits
mailing list