aboutsummaryrefslogtreecommitdiffstats
path: root/src/querycompleter.h
diff options
context:
space:
mode:
authorDanilo M. <danix@danix.xyz>2026-08-03 20:43:37 +0200
committerDanilo M. <danix@danix.xyz>2026-08-04 12:54:08 +0200
commit3a3220471d2b10811e77fe942a6c58f53df316b0 (patch)
tree517722ddb6051a393c532c5b5a5e30ec4f5adcc3 /src/querycompleter.h
parentf6f11e5142911f0c4a57b08d6425d1cf99187627 (diff)
downloadqtmaildir-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.h7
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.