diff options
| author | Maxime Coste <frrrwww@gmail.com> | 2013-07-15 13:49:04 +0100 |
|---|---|---|
| committer | Maxime Coste <frrrwww@gmail.com> | 2013-07-15 13:49:04 +0100 |
| commit | ee2d18df044359f35444bc1142e39be2f4865d44 (patch) | |
| tree | e9cbbe49d9d4823e36ce439f1bbb56ca0874b354 /src/normal.cc | |
| parent | 90b92aed3c85e21c7d825a721cb4391deb91a698 (diff) | |
fix selection to search pattern word begin detection
Diffstat (limited to 'src/normal.cc')
| -rw-r--r-- | src/normal.cc | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/normal.cc b/src/normal.cc index 11e95305..964d819e 100644 --- a/src/normal.cc +++ b/src/normal.cc @@ -347,7 +347,7 @@ void use_selection_as_search_pattern(Context& context) auto content = "\\Q" + String{begin.base(), end.base()} + "\\E"; if (smart) { - if (begin == buffer.begin() or (is_word(*begin) and not is_word(*begin-1))) + if (begin == buffer.begin() or (is_word(*begin) and not is_word(*(begin-1)))) content = "\\b" + content; if (end == buffer.end() or (is_word(*(end-1)) and not is_word(*end))) content = content + "\\b"; |
