[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kwrite-devel
Subject:    Re: Selected entry in completion list after removing characters
From:       Dominik Haumann <dhaumann () kde ! org>
Date:       2013-11-09 11:46:53
Message-ID: 2131009.csSfsoLESe () eriador
[Download RAW message or body]

On Saturday 09 November 2013 00:22:20 Sven Brauch wrote:
> Hi!
> 
> There's code in kate which keeps the current entry selected when you remove
> characters from the completed word, e.g. you have two completion entries Aaa
> and Aab, then you type Aab and remove the b; you will end up with the
> second entry selected in the list.
> 
> Now since this is done explicitly (i.e. removing code makes it always keep
> the first entry selected on changing the completion word), I wonder what
> sense it makes. It has the weird effect of you writing something, then
> removing a few characters again and ending up with your completion list
> scrolled to some random position, instead of going back to the first entry.
> 
> I'd argue when you remove characters then the selected entry clearly was not
> what you were looking for. So, why keep it selected instead of selecting
> the first entry again?
> 
> I think the reason I explicitly notice this behaviour now (as opposed to
> before) is that it got quite a bit more obvious through the introduction of
> the abbreviation / contains matching, since it's now much easier to
> accidentially select an entry which is far away from the first one (in terms
> of alphabetical sorting) than before. It got to a point where as an
> innocent user of KDevelop I'd call it a bug (in fact I was thinking it was
> a bug introduced by my changes until a few minutes ago when I discovered it
> is intentional).
> 
> Long story short, I'd like to remove the code which does this, if anyone
> wants this behaviour to stay, please scream at me now and explain why it's
> great. ;)

Hm, the current behavior has the advantage, that in the described case the 
current selected item just keeps the same. To me, this looks very 
deterministic...

The question is whether your proposed change in behavior is really of 
advantage: Can you test that over time? Can other developers who use code 
completion extensively test this change? Maybe Milian?

Greetings,
Dominik

> Greetings,
> Sven
> 
> ____
> P.S.: the code in question is katecompletionwidget.cpp:731-741
_______________________________________________
KWrite-Devel mailing list
KWrite-Devel@kde.org
https://mail.kde.org/mailman/listinfo/kwrite-devel
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic