mirror of
https://github.com/textmate/textmate.git
synced 2026-04-28 03:00:34 -04:00
Fix wrong behavior when selecting to end of line
This also affected a few other selection actions. Fixes #738.
This commit is contained in:
@@ -875,7 +875,8 @@ namespace ng
|
||||
ranges_t extend (buffer_t const& buffer, ranges_t const& selection, select_unit_type const unit, layout_movement_t const* layout)
|
||||
{
|
||||
static std::set<select_unit_type> const splittingUnits = { kSelectionExtendToWord, kSelectionExtendToTypingPair, kSelectionExtendToScope, kSelectionExtendToEndOfSoftLine, kSelectionExtendToEndOfIndentedLine, kSelectionExtendToEndOfLine, kSelectionExtendToEndOfParagraph, kSelectionExtendToBeginOfTypingPair, kSelectionExtendToEndOfTypingPair };
|
||||
bool shouldDissect = splittingUnits.find(unit) != splittingUnits.end();
|
||||
bool isColumnar = selection.size() == 1 && selection.last().columnar;
|
||||
bool shouldDissect = isColumnar && splittingUnits.find(unit) != splittingUnits.end();
|
||||
|
||||
ranges_t res;
|
||||
citerate(range, shouldDissect ? dissect_columnar(buffer, selection) : selection)
|
||||
|
||||
Reference in New Issue
Block a user