Download it now!
Bug 136294 - Red wrong spelled lining needs a trigger to get activated (spell checker)
Summary: Red wrong spelled lining needs a trigger to get activated (spell checker)
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
5.1.0.3 release
Hardware: All All
: high major
Assignee: Not Assigned
URL:
Whiteboard:
Keywords: bibisected, bisected, regression
Depends on:
Blocks: Spell-Checking
  Show dependency treegraph
 
Reported: 2020-08-30 15:23 UTC by Telesto
Modified: 2020-10-12 09:10 UTC (History)
4 users (show)

See Also:
Crash report or crash signature:


Attachments
Example file (8.93 KB, application/vnd.oasis.opendocument.text)
2020-08-30 15:23 UTC, Telesto
Details
Bibisect log (2.83 KB, text/plain)
2020-08-31 12:24 UTC, Telesto
Details
Another example (8.35 KB, application/vnd.oasis.opendocument.text)
2020-09-01 09:21 UTC, Telesto
Details
Example file (9.35 KB, application/vnd.oasis.opendocument.text)
2020-09-05 08:12 UTC, Telesto
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Telesto 2020-08-30 15:23:03 UTC
Description:
Red wrong spelled lining needs a trigger to get activated

Steps to Reproduce:
1. Open the attached file (assuming Austrian German dictionary) 
2. Replace the a in hallo with e -> hello
3. Press arrow left or left click at leute

Actual Results:
Nothing

Expected Results:
Spell checker should mark it


Reproducible: Always


User Profile Reset: No



Additional Info:
Version: 7.1.0.0.alpha0+ (x64)
Build ID: 6640d7f405d2970ba2825a9455926cc803284d01
CPU threads: 4; OS: Windows 6.3 Build 9600; UI render: default; VCL: win
Locale: fr-LU (nl_NL); UI: en-US
Calc: CL
Comment 1 Telesto 2020-08-30 15:23:19 UTC
Created attachment 164879 [details]
Example file
Comment 2 Telesto 2020-08-30 15:49:00 UTC
Also found in
Versie: 4.4.7.2 
Build ID: f3153a8b245191196a4b6b9abd1d0da16eead600
Locale: nl_NL

not in
Versie: 4.2.0.4 
Build ID: 05dceb5d363845f2cf968344d7adab8dcfb2ba71
Comment 3 Telesto 2020-08-30 16:31:57 UTC
This pretty confusing/frustrating from user perspective.

English dictionary
Type: Hello WORLD Hello
Select WORLD & replace with Wereld
Press F7 -> Wereld recognised
Press Close -> Cursor moves to the beginning -> still no red under lining
Comment 4 Telesto 2020-08-30 20:18:26 UTC
@Buovjaga
This one is bit higher on my bibisect priority list.
Comment 5 Buovjaga 2020-08-30 20:26:40 UTC
(In reply to Telesto from comment #4)
> @Buovjaga
> This one is bit higher on my bibisect priority list.

I tried on Linux, but unfortunately it is seen in the oldest of 44max, but not yet in latest of 43max :( If you have space, try on Windows with the respective repos
Comment 6 Telesto 2020-08-30 20:46:12 UTC
(In reply to Buovjaga from comment #5)
> (In reply to Telesto from comment #4)
> > @Buovjaga
> > This one is bit higher on my bibisect priority list.
> 
> I tried on Linux, but unfortunately it is seen in the oldest of 44max, but
> not yet in latest of 43max :( If you have space, try on Windows with the
> respective repos

It's fine in
Version: 4.3.8.0.0+
Build ID: 2d13cf60ecdab83997c9cd7275c799ddd96617cd

Must be a timer change in 4.4 branch. Did you try to remove the profile? 
They 4.4 Windows bibisect repro is one piece of worthless junk (there was a e-mail conversation about that).. Alternative would be Mac
Comment 7 Telesto 2020-08-31 08:17:44 UTC
Made a mistake.. it's the 5.1 branch where this started
Comment 8 Buovjaga 2020-08-31 10:35:46 UTC
(In reply to Telesto from comment #7)
> Made a mistake.. it's the 5.1 branch where this started

Then please bibisect because I am seeing different results (problem already in oldest of 5.0 and 5.1 repos)
Comment 9 Telesto 2020-08-31 12:24:52 UTC
Created attachment 164917 [details]
Bibisect log

Bisected to
author	Michael Stahl <mstahl@redhat.com>	2015-09-09 10:30:04 +0200
committer	Michael Stahl <mstahl@redhat.com>	2015-09-09 14:13:48 +0200
commit	4c91e94e892943ef5e031d65f6f42864233cb4cd (patch)
tree	c9f6e59cf2d776e028692ff19e58af57fea5deeb
parent	f9f3e97ca867db59f2fc2e4fdb5583ed49cab49c (diff)
tdf#92036: sw: fix idle spelling loop
There is a sort of intentional infinite loop in the idle spell checking
handler: while the user is typing a word, it should not be marked as
invalid yet, in order not to annoy them with red underlines.

So the word where the cursor is positioned always remained dirty, unless
you happen to have a grammar checker enabled, which clears the
paragraph's dirty flag from a separate thread.

To avoid the infinite loop, add another spell checking state "PENDING"
which is the same as dirty except that it should cancel the idle spell
checking.

The idle spell checking will run again when the user does the next
editing operation.  Notably this means if the user just moves the cursor
out of the wrongly spelled word, it won't be underlined yet, but that
appears a minor issue, and checking when the cursor leaves the word
appears too hard to implement.

https://cgit.freedesktop.org/libreoffice/core/commit/?id=4c91e94e892943ef5e031d65f6f42864233cb4cd
Comment 10 Telesto 2020-08-31 12:26:28 UTC
Adding CC: to Michael Stahl
Comment 11 Telesto 2020-08-31 12:35:59 UTC
Grumble grumble
Quite: "Notably this means if the user just moves the cursor out of the wrongly spelled word, it won't be underlined yet"

This is actually pretty annoying. And not limited to 'moving the cursor' with arrow keys. It's also happens when clicking somewhere else in the document. Or make a change Open the spelling dialog (F7). Close it. 

It always acting as if the spell checker being broken. Of course it don't like te revert back to original position.

I would say pressing arrow keys or a left mouse click as a valid reason to trigger spell checker. As long as the spell checker doesn't check while typing.

So 'not about' checking of you exit a word. Simply (also) start the spell checker when pressing a arrow key or on a left mouse click & when opening a dialog (say spell checker). 

I personally prefer a case with a superfluous red underline, instead of no underline at all.
Comment 12 Telesto 2020-09-01 09:21:48 UTC
Created attachment 164955 [details]
Another example

1. Open the attached file (make sure of English
2. Right click COMPLEXP & correct it with a suggestion
3. Right click REFIXES & correct it with a suggestion
4. CTRL+Z twice

Notice that COMPLEXP  isn't underlined until you right click somewhere or make another move which triggers the dirty flag
Comment 13 Telesto 2020-09-03 13:52:49 UTC
@Xisco,
However this is a regression from user point of view. However, the developer explicitly choose to do it this way. So not so sure about the regression part. I'm fine with it, but most developers beg to differ..
Comment 14 Telesto 2020-09-05 08:12:57 UTC
Created attachment 165173 [details]
Example file

The plot thickens 

1. Open the attached file
2. Type a letter somewhere inside DISSIDENT to make wrong spelled
3. Click out of Header

Behavior is pretty natural, IMHO
Comment 15 Telesto 2020-10-12 09:10:58 UTC
@Jan-Marek
This is a kind flaw which make the spell checker look broken.. It will short out itself after clicking somewhere, but it's discomforting. Huh.. why is the word not underlined? So not 'critical' but more annoying.

You're being the timer expert. M. Stahl has enough on his plate already. And code being kind of magic to me. So an attempt to get someone interested. 
Not saying you are available or must look into it ;-). However I would love this to disappear as this not being nice from user experience perspective. Or I'm personally attributing to much worth to it, however there are some duplicates.

So question is, is there a different approach to M. Stahl is solution? Or is it as simple as making key-press (say CTRL+Z or mouse click) trigger a next run. Don't believe this, as I assume I would have been considered back then..


> Bisected to
> author	Michael Stahl <mstahl@redhat.com>	2015-09-09 10:30:04 +0200
> committer	Michael Stahl <mstahl@redhat.com>	2015-09-09 14:13:48 +0200
> commit	4c91e94e892943ef5e031d65f6f42864233cb4cd (patch)
> tree	c9f6e59cf2d776e028692ff19e58af57fea5deeb
> parent	f9f3e97ca867db59f2fc2e4fdb5583ed49cab49c (diff)
> tdf#92036: sw: fix idle spelling loop
> There is a sort of intentional infinite loop in the idle spell checking
> handler: while the user is typing a word, it should not be marked as
> invalid yet, in order not to annoy them with red underlines.
> 
> So the word where the cursor is positioned always remained dirty, unless
> you happen to have a grammar checker enabled, which clears the
> paragraph's dirty flag from a separate thread.
> 
> To avoid the infinite loop, add another spell checking state "PENDING"
> which is the same as dirty except that it should cancel the idle spell
> checking.
> 
> The idle spell checking will run again when the user does the next
> editing operation.  Notably this means if the user just moves the cursor
> out of the wrongly spelled word, it won't be underlined yet, but that
> appears a minor issue, and checking when the cursor leaves the word
> appears too hard to implement.
> 
> https://cgit.freedesktop.org/libreoffice/core/commit/
> ?id=4c91e94e892943ef5e031d65f6f42864233cb4cd