You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
99% of the time I'm fine with the default sorting of completion candidates. I've ran into a few scenarios where I would like to sort them differently (such as a list of items sorted by most recently accessed). I see there is a workaround provided in this issue to subclass the Candidate class and override the compareTo() method. I'm interacting with JLine from a JVM language (CFML) that adds enough boilerplate and runtime overhead to extend Java classes on the fly that this is not a very convenient option for me.
I would like to suggest the Candidate class introduce a new numeric sort member that defaults to 0 when not set. That will allow the default behavior to persist, but when creating my Candidate instances, I can pass a sort integer of my own creation to force an arbitrary sort order while still relying on the base compareTo() method.
The text was updated successfully, but these errors were encountered:
99% of the time I'm fine with the default sorting of completion candidates. I've ran into a few scenarios where I would like to sort them differently (such as a list of items sorted by most recently accessed). I see there is a workaround provided in this issue to subclass the
Candidate
class and override thecompareTo()
method. I'm interacting with JLine from a JVM language (CFML) that adds enough boilerplate and runtime overhead to extend Java classes on the fly that this is not a very convenient option for me.I would like to suggest the
Candidate
class introduce a new numericsort
member that defaults to0
when not set. That will allow the default behavior to persist, but when creating myCandidate
instances, I can pass a sort integer of my own creation to force an arbitrary sort order while still relying on the basecompareTo()
method.The text was updated successfully, but these errors were encountered: