[latexila] Completion: fix window placement for empty LaTeX command
- From: Sébastien Wilmet <swilmet src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [latexila] Completion: fix window placement for empty LaTeX command
- Date: Sun, 28 Apr 2013 17:57:54 +0000 (UTC)
commit 9116f0d6a44bc45723eb6833d0c48e2168d3ee02
Author: Sébastien Wilmet <swilmet gnome org>
Date: Sun Apr 28 19:56:21 2013 +0200
Completion: fix window placement for empty LaTeX command
src/completion.vala | 9 ++++++++-
1 files changed, 8 insertions(+), 1 deletions(-)
---
diff --git a/src/completion.vala b/src/completion.vala
index 422d88d..dbb5b27 100644
--- a/src/completion.vala
+++ b/src/completion.vala
@@ -139,10 +139,17 @@ public class CompletionProvider : GLib.Object, SourceCompletionProvider
// Custom implementation when in a LaTeX command name.
iter = context.iter;
+ TextIter prev = iter;
+ if (prev.backward_char () && prev.get_char () == '\\')
+ {
+ iter = prev;
+ return true;
+ }
+
if (! iter.starts_word ())
iter.backward_visible_word_start ();
- TextIter prev = iter;
+ prev = iter;
if (prev.backward_char () && prev.get_char () == '\\')
iter = prev;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]