Opened 13 years ago

Closed 13 years ago

#644 closed Enhancement (Fixed)

[PATCH] Very lazy tab completion

Reported by: colloquy@… Owned by: timothy
Component: Chat Core (IRC) Version: Local Build
Severity: Trivial Keywords:
Cc:

Description

Here's a patch to enable tab completion for the very lazy. Pressing TAB without starting a word to complete with paste the nickname of the last user to send a message to the room beginning with with "mynick", where "mynick" is, errr, my nick.

Change History (1)

comment:1 Changed 13 years ago by timothy

  • Resolution set to fixed
  • Status changed from new to closed

This is a good idea, and I have landed this patch with a few adjustments.

1) No need for _lastDirectSender, lets just use _preferredTabCompleteNicknames objectAtIndex:0 for this. They really are the same thing in most cases.
2) _lastDirectSender was never retained or released, leading to a crash. Not a problem now that we don't have it.
3) addObject: _lastDirectSender might have cause an exception if _lastDirectSender was nil, also not a problem since we don't use it.

One last change I made. Only allow an empty tab completion if the current position is zero, this feels best in practice.

Other than that, great patch! [3238]

Note: See TracTickets for help on using tickets.