Bug 459351 - Overzealous word suggestion tool sometimes inserts words arbitrarily
Summary: Overzealous word suggestion tool sometimes inserts words arbitrarily
Status: RESOLVED WORKSFORME
Alias: None
Product: kate
Classification: Applications
Component: application (other bugs)
Version First Reported In: 22.08.1
Platform: Manjaro Linux
: NOR normal
Target Milestone: ---
Assignee: KWrite Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-09-18 20:38 UTC by Mark Grieveson
Modified: 2022-11-12 18:50 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed/Implemented In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Mark Grieveson 2022-09-18 20:38:55 UTC
SUMMARY
***
NOTE: If you are reporting a crash, please try to attach a backtrace with debug symbols.
See https://community.kde.org/Guidelines_and_HOWTOs/Debugging/How_to_create_useful_crash_reports
***
When typing, there is suggested text.  I would select this and continue.  But, when I would bace to a word, it would arbitrarily add a suggested text, without being requested to do so.

STEPS TO REPRODUCE
1. type some words
2. use the suggested words to fill in one or more words (auto-completion)
3. backspace to an auto-completed word, and obseve it randomly insert an additional word in (this additional word often being one of the previous words that auto-complete had previously been called upon to insert).

OBSERVED RESULT

When typing in kwrite, I was taking notes from a site (https://www.chiark.greenend.org.uk/~sgtatham/bugs.html) on writing proper bug reports.  I had written the following:

[quote]
Bug reports

Describe WHAT did, then WHAT happened.  Tell them what you saw 

[/quote]

I was using the text prompts for the last three words ("what", "you", "saw").  I ended up one space away from the word "saw", which was the end of the sentence.  So, I backspaced one space to add a period, but as the cursor got beside the word "saw", that word was immediately repeated and inserted into the document.  Thus, I ended up with the following:

[quote]
Bug reports

Describe WHAT did, then WHAT happened.  Tell them what you sawsaw.
[/quote]

I attempted to go back, but yet again it inserted a couple of words, this time "say" and then "yo".  Thus, I ended up with the following at this point:

[quote]
Bug reports

Describe WHAT did, then WHAT happened.  Tell them what you sawsayyo
[/quote]

I pressed the backspace key four times, and then it inserted "wha":
[quote]
Bug reports

Describe WHAT did, then WHAT happened.  Tell them what you sawswha
[/quote]


Here is what I saw:
The window with the text.  The lines are numbered 1 ("Bug reports"), 2 (*blank*), 3 ("Describe WHAT you did, the WHAT"), 3 continued (an arrow indicating a wrapping of line #3) ("happened.  Tell them what you"), 3 continued again (an arrow indicating a wrapping of the line) ("sawswha")

On the bottom, under the window with the written text, I see:

[quote]
3:71  INSERT  en_GB  Soft Tabs: 4  UTF-8  Normal
[/quote]

Note, the word "Normal" above is in a box.  Also note, regarding "INSERT", I have tested this when "OVERWRITE" is chosen, and I get the same overzealous word insertion behaviour from the program.

Beneath that is the suggested text, which currently shows:

[quote]
wha  what  whatever  whatsoever
[/quote]

"wha" is highlighted.

Finally, underneath, I see the digital keyboard.

EXPECTED RESULT
So, upon the cursor meeting the last word ("saw") when I backspaced one space to insert the period, I expected that it would NOT continue to insert words, and instead would allow me to insert the period and continue.  This would have given me the following:

[expectation]

Bug reports

Describe WHAT did, then WHAT happened.  Tell them what you saw.
[/expectation]

As mentioned, the expectation above did not happen.  There were no error messages.  The program kept inserting these suggestions, in spite of me not having chosen the suggestions. 



SOFTWARE/OS VERSIONS

Linux/KDE Plasma:    5.19.9-1-MANJARO-ARM
(available in About System)
KDE Plasma Version:  5.25.5
KDE Frameworks Version: 5.98
Qt Version: 5.15.6

ADDITIONAL INFORMATION
OS type:  64-bit
Pinephone Pro
Processors:  4 x ARM Cortex-A53, 2 x ARM Cortex-A72
Memory:  3.8 GiB of RAM
Comment 1 Mark Grieveson 2022-09-18 20:50:03 UTC
Quick correction.  The summary states, "But, when I would bace to a word", but this should read, "But, when I would backspace to a word"
Comment 2 Lothar 2022-09-29 07:33:55 UTC
> Finally, underneath, I see the digital keyboard.

So, you are using a tablet ? Maybe cause the virtual keyboard the trouble. My mobile phone keyboard make also suggestion on the current text, which is not hassle free (just as hint, not related to Kate).
Comment 3 Christoph Cullmann 2022-11-12 18:50:04 UTC
Sorry, can't reproduce this.
We improved some stuff with 5.99 but I would not assume this is relevant for this bug.