#104 check document on activation of "check while type"

closed
spellcheck (5)
5
2012-11-01
2012-02-27
Dietmar Schabus
No

With geany-plugins-0.21.1 on geany-0.21, I think the following behavior could be improved: If you do a
$ echo -n "The quik brown fox jumps over the lazy dog.\n\n\n" > foo.txt
$ geany foo.txt
and then activate the "spell check as you type" button in geany, the misspelled word "quik" does not get underlined. If you start typing in line 4, also nothing happens. Only if you start to edit the first line (the one with the typo), the word gets underlined.

I often write long LaTeX documents in geany, which are edited by a couple of people. I realized just now that there is a keyboard shortcut one can define, in order to check the entire document. This is quite hidden though (I feel), and I think a check of the entire document should be performed when the "check while typing" button is activated, especially since it's the only GUI element for the spellcheck plugin.

Consider the following quick and dirty patch:

diff src_orig/gui.c src/gui.c
80a81,83
> if (sc_info->check_while_typing)
> perform_check(document_get_current());
>
233c236
< static void perform_check(GeanyDocument *doc)
---
> void perform_check(GeanyDocument *doc)
diff src_orig//gui.h src/gui.h
49a50,51
> void perform_check(GeanyDocument *doc);

This does what I am looking for, however it makes something else apparent: when you turn "check as you type" off, the red squiggly underlinings are not removed. I think this should also be done, but I didn't see a quick solution.

Thanks for considering, and thanks for geany-plugins in the first place.

Discussion

  • Enrico Tröger
    Enrico Tröger
    2012-11-01

    Implemented in GIT master.
    Basically as you requested, including removing of the error markers when turning 'check while typing' off.

     
  • Enrico Tröger
    Enrico Tröger
    2012-11-01

    • status: open --> closed