Ticket #2975 (closed enhancement: fixed)

Opened 22 months ago

Last modified 5 months ago

TAB completion improvement

Reported by: Corwin Owned by: asterix
Priority: normal Milestone: 0.12
Component: chat Version: svn
Severity: normal Keywords:
Cc: OS: All

Description

Now we`ve got cyclic nicknames completion by pressing Tab on empty message input (great!), but there`s one more idea of improving it. The idea is, when Tab on empty string is pressed, the nicknames will be cycled in the same order that those people highlighted my nickname - so, one who addressed last will be first on the completion list. With such semi-automatic Tab completion it`ll be much easier to talk with several people using minimum keypresses (that is, in Jabber nicknames may start from any Unicode symbol, that you simply can not input - or it can be in different keymap, switching to which (and than back again) is not very convinient).
PS. I know this resembles #2658 a little, but this is different and IMO even better. There is no need to look into history, simply keep completion list sorted accordingly to hilights of my nick

Attachments

complete_nicks.diff (1.6 kB) - added by dmitry.olyenyov@… 19 months ago.

Change History

Changed 22 months ago by asterix

  • milestone changed from 0.11.1 to 0.12

Changed 22 months ago by anonymous

  • owner changed from asterix to anonymous
  • status changed from new to assigned

Changed 22 months ago by Corwin

  • owner changed from anonymous to asterix
  • status changed from assigned to new

Changed 19 months ago by dmitry.olyenyov@…

Changed 19 months ago by dmitry.olyenyov@…

I think I made this enhancement... Could anybody check if it is correct.

Changed 19 months ago by Jim++

  • status changed from new to closed
  • resolution set to fixed

Fixed in [8158]. (I made it faster)

Changed 19 months ago by Jim++

See also [8160]

Changed 5 months ago by dmitry.olyenyov@…

  • status changed from closed to reopened
  • resolution fixed deleted
  • os set to All

User "js" added call for "list_nick.sort()" function which broke this completion feature... Could some one check is there any reason to do this?

file groupchat_control.py

  8158      jim++                               if begin == '': 
  8158      jim++                                       # empty message, show lasts nicks that highlighted us first
  8158      jim++                                       for nick in self.attention_list:
  8158      jim++                                               if nick in list_nick:
  8158      jim++                                                       list_nick.remove(nick)
  8158      jim++                                               list_nick.insert(0, nick)
  8158      jim++ 
  7805      jim++                               list_nick.remove(self.nick) # Skip self
  9660         js                               list_nick.sort()

Changed 5 months ago by js

I added this so because there was no ordering at all for me, that way, I have at least alphabetical ordering. It wasn't ordered by usage, I often had someone completed I never talked to and who never talked to me.

Changed 5 months ago by dmitry.olyenyov@…

Then maybe it would be better to sort before inserting last used nicks?

Changed 5 months ago by js

Not only that, IMO, we should also sort by last usage if we for example just write the first letter, or better: we should always sort by last usage first and then by nick. Like irssi does.

Changed 5 months ago by jim++

  • status changed from reopened to closed
  • resolution set to fixed

(In [9893]) Make nick completion work fine with an empty refer_to_nick_char Make nick completion sorted case-insensitive. Fixes #4063. (was already IMO) Restore #2975 way. Last nick that highlighted us are first. Fixes #2975.

Changed 5 months ago by Jim++

Just restored behaviour. Maybe we could imagine better.

Here, we are placing (only) people that highlighted us at first. And only for the completion at the beginning of a message. Not the one in the middle of a message AFAIK.

Not sure that is really needed anyway. And that's not urgent.

Changed 5 months ago by js

My idea would be to generate a list on joining the room. That list is sorted alphabetically. Each time you get highlighted by somebody, that person is moved to the top of that list. Now if you press tab, you just iterate through that list. If you have typed for example abcd and then press tab, you iterate through all items of the list that start wiht abcd. Any better suggestion?

Changed 5 months ago by js

No wait, that idea sucks. What if somebody joins later?

Add/Change #2975 (TAB completion improvement)

Author



Change Properties
<Author field>
Action
as closed
Next status will be 'reopened'
 
Note: See TracTickets for help on using tickets.