diff options
author | Mathieu OTHACEHE <m.othacehe@gmail.com> | 2016-08-07 12:50:52 +0200 |
---|---|---|
committer | Jérémie Courrèges-Anglas <jca@wxcvbn.org> | 2016-11-11 15:32:48 +0100 |
commit | 0c4ea38ef84d990eb531267c980e2b90fe6a6f3a (patch) | |
tree | 0a1ec5713b8f4eea19f1c282ef2c16e0cfa681e8 /src/data.h | |
parent | 8511dc94fc96bd5ad2ece8d730d9a9149859558a (diff) | |
download | ratpoison-0c4ea38ef84d990eb531267c980e2b90fe6a6f3a.zip |
Introduce multiple completion styles.
The default, legacy style is named BASIC. A new completion style named
SUBSTRING is added.
Use SUBSTRING for window name completion in select command. Use BASIC
everywhere else.
Diffstat (limited to 'src/data.h')
-rw-r--r-- | src/data.h | 16 |
1 files changed, 16 insertions, 0 deletions
@@ -332,6 +332,19 @@ struct modifier_info typedef struct list_head *(*completion_fn)(char *string); +/* + BASIC: The completion shall begin with the same characters as the partial + string. Case is ignored. + + SUBSTRING: The partial string shall be a subpart of the completion. Case + is ignored. +*/ +enum completion_styles +{ + BASIC, + SUBSTRING +}; + struct rp_completions { /* A pointer to the partial string that is being completed. We need @@ -352,6 +365,9 @@ struct rp_completions /* virgin = 1 means no completions have been attempted on the input string. */ unsigned short int virgin; + + /* The completion style used to perform string comparisons */ + enum completion_styles style; }; struct rp_input_line |