Indented line movement now produce multiple carets for column selections

This commit is contained in:
Allan Odgaard
2016-08-15 09:34:18 +02:00
parent 68f468ae20
commit a24fc7804d

View File

@@ -797,8 +797,8 @@ namespace ng
ranges_t move (buffer_api_t const& buffer, ranges_t const& selection, move_unit_type const orgUnit, layout_movement_t const* layout)
{
static std::set<move_unit_type> const leftward = { kSelectionMoveLeft, kSelectionMoveFreehandedLeft, kSelectionMoveToBeginOfLine, kSelectionMoveToBeginOfParagraph, kSelectionMoveToBeginOfTypingPair, kSelectionMoveToBeginOfSoftLine, kSelectionMoveToBeginOfSubWord, kSelectionMoveToBeginOfWord };
static std::set<move_unit_type> const rightward = { kSelectionMoveRight, kSelectionMoveFreehandedRight, kSelectionMoveToEndOfLine, kSelectionMoveToEndOfParagraph, kSelectionMoveToEndOfTypingPair, kSelectionMoveToEndOfSoftLine, kSelectionMoveToEndOfSubWord, kSelectionMoveToEndOfWord };
static std::set<move_unit_type> const leftward = { kSelectionMoveLeft, kSelectionMoveFreehandedLeft, kSelectionMoveToBeginOfIndentedLine, kSelectionMoveToBeginOfLine, kSelectionMoveToBeginOfParagraph, kSelectionMoveToBeginOfTypingPair, kSelectionMoveToBeginOfSoftLine, kSelectionMoveToBeginOfSubWord, kSelectionMoveToBeginOfWord };
static std::set<move_unit_type> const rightward = { kSelectionMoveRight, kSelectionMoveFreehandedRight, kSelectionMoveToEndOfIndentedLine, kSelectionMoveToEndOfLine, kSelectionMoveToEndOfParagraph, kSelectionMoveToEndOfTypingPair, kSelectionMoveToEndOfSoftLine, kSelectionMoveToEndOfSubWord, kSelectionMoveToEndOfWord };
bool isLeftward = leftward.find(orgUnit) != leftward.end();
bool isRightward = rightward.find(orgUnit) != rightward.end();