Bug 387729 - SpellCheck 'Add To Dictionary' and 'Ignore Word' options don't work
Summary: SpellCheck 'Add To Dictionary' and 'Ignore Word' options don't work
Status: RESOLVED FIXED
Alias: None
Product: frameworks-ktexteditor
Classification: Frameworks and Libraries
Component: general (show other bugs)
Version: 5.52.0
Platform: unspecified All
: NOR normal
Target Milestone: ---
Assignee: KWrite Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-12-09 08:31 UTC by Sohail
Modified: 2018-12-29 19:36 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed In: 5.55


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Sohail 2017-12-09 08:31:06 UTC
When spellcheck highlights an item, if we click Add to Dictionary or Ignore Word, the red line under the word disappears. But as soon as we scroll that text out of the view and return to it, or as soon as we close and open the text file, or Kate, again; the spellchecker highlights the item again.

In other words, it appears 'Add To Dictionary' and 'Ignore Word' options don't work.
Comment 1 Greg Lepore 2017-12-27 13:17:08 UTC
Confirming on Kate 17.12 on Linux. 

KDE version:
KDE Frameworks 5.41.0
Qt 5.9.3 (built against 5.9.3)

Kate Part
Version 5.41.0
Comment 2 Ahmad Samir 2018-12-26 10:45:09 UTC
https://phabricator.kde.org/D17630
Comment 3 Ahmad Samir 2018-12-26 10:46:15 UTC
*** Bug 380461 has been marked as a duplicate of this bug. ***
Comment 4 Christoph Cullmann 2018-12-29 15:37:55 UTC
Git commit 3329357359947d8571aab87ea35157dcc22deccc by Christoph Cullmann, on behalf of Ahmad Samir.
Committed on 29/12/2018 at 15:38.
Pushed by cullmann into branch 'master'.

Don't re-mark words added/ignored to the dictionary as misspelled

Summary:
When a word is added to the dictionary or ignored via the spellingMenu,
the BackgroundChecker instance in ontheflycheck should be updated to
reflect the changes, otherwise words already added to the dictionary
(or ignored) are re-highlited as misspelled when the view changes.

Depends on D17629.

Test Plan:
- Open a file with misspelled words in kate and enable automatic
  spellchecking
- Using the context menu:
  - add a misspelled word to the dictionary
  - Ignore another word B
  misspelling highlighting is removed, as expected
- Scroll up/down so that those particular words are out of view then scroll
  and show them again; notice that those words re-highlighted as misspelled
- After applying the pacth, words added/ingored to the dictionary aren't going
  to be re-highlighted as misspelled when the view changes

Reviewers: cullmann, davidedmundson

Reviewed By: cullmann

Subscribers: kwrite-devel, kde-frameworks-devel

Tags: #kate, #frameworks

Differential Revision: https://phabricator.kde.org/D17630

M  +21   -0    src/spellcheck/ontheflycheck.cpp
M  +2    -0    src/spellcheck/ontheflycheck.h
M  +2    -0    src/spellcheck/spellcheck.cpp
M  +8    -0    src/spellcheck/spellcheck.h

https://commits.kde.org/ktexteditor/3329357359947d8571aab87ea35157dcc22deccc