Bug 300453 - word completion inside word should delete any part of word after cursor
Summary: word completion inside word should delete any part of word after cursor
Status: RESOLVED FIXED
Alias: None
Product: kate
Classification: Applications
Component: part (other bugs)
Version First Reported In: unspecified
Platform: openSUSE Linux
: NOR wishlist
Target Milestone: ---
Assignee: KWrite Developers
URL:
Keywords:
Depends on:
Blocks: 89576
  Show dependency treegraph
 
Reported: 2012-05-22 14:05 UTC by Andreas Nordal
Modified: 2015-08-01 21:08 UTC (History)
3 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 Andreas Nordal 2012-05-22 14:05:30 UTC
This is a wish for a different solution to the problem described in bug 89576 aka
«word completion doesn't use latter part of word to suggest better hint»:

In Kate and Kwrite, when placing the cursor inside a word, word completion only considers the first part of the word (as delimited by the cursor) to suggest completions. I think this is totally fine.
    However, after choosing a completion, the second half is still there, as a suffix to the word I just chose to complete. I find myself always deleting that leftover suffix. I want it to be deleted automatically.

Reproducible: Always

Steps to Reproduce:
1. in Kate, write (without quotes) the names "Jensen" and "Hansen" on separate lines
2. mark "Han" and overwrite it with "Jen"
3. if you have word completion enabled after 3 characters, Kate will now suggest that you mean "Jensen". Let it complete that for you.

Actual Results:  
Kate has now invented the name "Jensensen" for you.

Expected Results:  
Just "Jensen" would be fine.

By not deleting the leftover suffix, Kate is taking word completion to a whole new level by inventing new words. This is NOT behavior you need or expect from a «word completion» feature.

How this wish is a prerequisite to wish 89576:
The leftover suffix has to be deleted anyway. Taking the second part of the word into account «to suggest better hint» can be implemented later.

How I don't like wish 89576:
I'm not sure I even want a «better hint», if that means narrowing the search. Shouldn't "Jenny" be considered for completion of "Jen" regardless of "sen" being after the cursor? I don't know. One can always narrow the search further (exclude Jenny) by typing more characters.
Comment 1 Alex Turbov 2013-08-19 19:34:35 UTC
> However, after choosing a completion, the second half is still there, as a suffix to the word I just chose to complete. I find myself always deleting that leftover suffix. I want it to be deleted automatically.

This feature has been implemented in 4.11 release (as default behaviour, w/ configurable option for an old style)
Comment 2 Christoph Cullmann 2015-08-01 21:08:33 UTC
I think it is ok that way, without config option.