diff options
| author | Danilo M. <danix@danix.xyz> | 2026-08-03 20:43:37 +0200 |
|---|---|---|
| committer | Danilo M. <danix@danix.xyz> | 2026-08-04 12:54:08 +0200 |
| commit | 3a3220471d2b10811e77fe942a6c58f53df316b0 (patch) | |
| tree | 517722ddb6051a393c532c5b5a5e30ec4f5adcc3 /src/querycompleter.h | |
| parent | f6f11e5142911f0c4a57b08d6425d1cf99187627 (diff) | |
| download | qtmaildir-3a3220471d2b10811e77fe942a6c58f53df316b0.tar.gz qtmaildir-3a3220471d2b10811e77fe942a6c58f53df316b0.zip | |
feat(completion): complete both bounds of a date range
Each side of '..' is an independent value against the same model. Entries
that are themselves ranges are withheld once a range exists, since
date:1week....today is malformed.
The token is read to its full extent rather than truncated at the caret:
the separator deciding which bound is being edited can sit to the right
of the caret. Stems stay caret-bounded so matching never uses untyped
text.
Diffstat (limited to 'src/querycompleter.h')
| -rw-r--r-- | src/querycompleter.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/querycompleter.h b/src/querycompleter.h index d9635c0..e2a983b 100644 --- a/src/querycompleter.h +++ b/src/querycompleter.h @@ -44,6 +44,13 @@ struct CompletionContext /// being completed, so accepting never disturbs neighbouring text. int replaceFrom = 0; int replaceLength = 0; + + /// Whether candidates that are themselves ranges may be offered. + /// + /// The relative date entries ("1week..") are complete open-ended ranges. + /// Offering one inside an existing range yields date:1week....today, which + /// is malformed, so they are withheld once a range is underway. + bool allowRangeEntries = true; }; /// Decides what the cursor position implies about completion. |
