[Aptitude-devel] Bug#613794: Bug#613794: aptitude: cursor position in textfields. Usability improvement.

Manuel A. Fernandez Montecelo manuel.montezelo at gmail.com
Thu Oct 1 23:34:46 UTC 2015


Hi both,

2015-10-01 23:19 Axel Beckert:
>Hi,
>
>Antonio Ospite wrote:
>> > >maybe we can improve the cursor position in textfields (search box, limit
>> > >display box): currently it is always at the _beginning_ of textfields, even
>> > >when there is text in them already.
>> > >
>> > >Here is how aptitude behaves now:
>> > > 1. Open the Search box (For example with the '/' key)
>> > > 2. Insert some text and press OK
>> > > 3. Open the Search box again, the cursor is shown at the _beginning_ of the
>> > >    previously inserted text.
>
>JFTR: This only happens if aptitude::UI::Minibuf-Prompts is set to
>false (which is the default). If set to true, the cursor is always at
>the end of the shown text.
>
>> I still think that the natural position of the cursor should be at the
>> end of the already inserted text, and I would like to hear the opinion
>> of others about it, but I will survive even without all that :)
>
>I never was annoyed by that because I always use
>aptitude::UI::Minibuf-Prompts=true, but I would be annoyed if the
>mini-buffer would behave like the search box does.
>
>I think, we should make both cases behave the same way. And from my
>point of view, the "right" way is that the cursor should be at the end
>of the text, too.

Thanks for the input.  I also think that it's the best thing to do in
general, I am just afraid of breaking user expectations after many years
being this way.

The other slightly weird issue is that it clears the input as soon as
one starts typing, rightly pointed out in the original submission, maybe
some people rely on that behaviour by now.

With mini-buffer, at least some text inputs (search, limits, grouping)
behave in the same way when typing -- previous input is also cleared.
Which doesn't make sense to me, why to have anything at all if you are
clearing when starting to type?  Specially if you go to the trouble to
move the cursor to the end?


And here's a nice trick: with minibuf=true, pressing 'right arrow' (or
end, ctrl-e, etc) and typing, doesn't clear the text, even if the cursor
is in the same position :-)

Conversely, with minubuf=false, the cursor starts in the beginning and
clears when typing, but if you press 'left arrow' or home or ctrl-a, it
doesn't, stays in the same position but when typing now inserts instead
of clearing.


BTW, this was changed to be in the beginning of the line (not for
minibuf=true, it seems) back in 2001, version 0.2.9-1, after a user
requested it:

  https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=120890

What do you think about that report?


I guess that it's better to change the behaviour, put the cursor in the
end in both cases, and not delete.  If people are unhappy I am sure that
we will receive hate mail^W^W new bug reports.

But still, that Daniel Burrows thinks that "it's clearly much better
than the current behavior" is intriguing.


Cheers.
-- 
Manuel A. Fernandez Montecelo <manuel.montezelo at gmail.com>



More information about the Aptitude-devel mailing list