Filters: correct select_to_previous_WORD
This commit is contained in:
parent
c532f031d2
commit
5bd61a3f38
|
@ -160,13 +160,11 @@ Selection select_to_next_WORD_end(const BufferIterator& cursor)
|
||||||
Selection select_to_previous_WORD(const BufferIterator& cursor)
|
Selection select_to_previous_WORD(const BufferIterator& cursor)
|
||||||
{
|
{
|
||||||
BufferIterator begin = cursor;
|
BufferIterator begin = cursor;
|
||||||
if (categorize<false>(*begin) != categorize<false>(*(begin+1)))
|
if (categorize<false>(*begin) != categorize<false>(*(begin-1)))
|
||||||
++begin;
|
--begin;
|
||||||
|
|
||||||
skip_while_reverse(begin, is_eol);
|
skip_while_reverse(begin, is_eol);
|
||||||
|
BufferIterator end = begin;
|
||||||
BufferIterator end = begin+1;
|
|
||||||
|
|
||||||
skip_while_reverse(end, is_blank);
|
skip_while_reverse(end, is_blank);
|
||||||
skip_while_reverse(end, [] (char c) { return !is_blank(c) and !is_eol(c); });
|
skip_while_reverse(end, [] (char c) { return !is_blank(c) and !is_eol(c); });
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user