diff options
| author | Maxime Coste <frrrwww@gmail.com> | 2012-01-09 14:22:52 +0000 |
|---|---|---|
| committer | Maxime Coste <frrrwww@gmail.com> | 2012-01-09 14:22:52 +0000 |
| commit | e02cb4e5bdcdd10429c02d65af06bb4dfb8a96cb (patch) | |
| tree | bdb8104de147990b97c3f73936cb94ddf429297e /src/selectors.cc | |
| parent | 8b1b1d9cd83d3c6b6fa1c0e4a2adb02ab585a985 (diff) | |
Selectors: select_next_match starts from cursor+1
so searching effectively starts on the character after current
selection end. Which makes repeating 'n' on a one character match
work.
Diffstat (limited to 'src/selectors.cc')
| -rw-r--r-- | src/selectors.cc | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/selectors.cc b/src/selectors.cc index 342b2170..3aaee02a 100644 --- a/src/selectors.cc +++ b/src/selectors.cc @@ -367,7 +367,7 @@ Selection select_next_match(const BufferIterator& cursor, { boost::match_results<BufferIterator> matches; - if (boost::regex_search(cursor, cursor.buffer().end(), matches, + if (boost::regex_search(cursor+1, cursor.buffer().end(), matches, ex)) { begin = matches[0].first; @@ -375,7 +375,7 @@ Selection select_next_match(const BufferIterator& cursor, std::copy(matches.begin(), matches.end(), std::back_inserter(captures)); } - else if (boost::regex_search(cursor.buffer().begin(), cursor, matches, + else if (boost::regex_search(cursor.buffer().begin(), cursor+1, matches, ex)) { begin = matches[0].first; |
