From 3a3220471d2b10811e77fe942a6c58f53df316b0 Mon Sep 17 00:00:00 2001 From: "Danilo M." Date: Mon, 3 Aug 2026 20:43:37 +0200 Subject: 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. --- src/querycompleter.h | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'src/querycompleter.h') 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. -- cgit v1.2.3