Don’t use “entire document” fallback input with multiple carets

This commit is contained in:
Allan Odgaard
2015-08-27 22:58:56 +02:00
parent d02421670f
commit c603b83050

View File

@@ -19,7 +19,7 @@ namespace ng
for(auto const& range : ranges)
noSelection = noSelection && range.empty();
input::type actualUnit = unit == input::selection && noSelection ? fallbackUnit : unit;
input::type actualUnit = unit == input::selection && noSelection && (ranges.size() == 1 || fallbackUnit != input::entire_document) ? fallbackUnit : unit;
*inputWasSelection = actualUnit == input::selection;
ng::ranges_t res;