aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarc André Tanner <mat@brain-dump.org>2016-03-09 18:36:03 +0100
committerMarc André Tanner <mat@brain-dump.org>2016-03-10 16:09:39 +0100
commit5f8760a614e11dc2f665ed4a23309875a6af61df (patch)
tree30e66be32a504bd67cd169ca1774101aa695e433
parent5cec5b27e258bc8ef61db9adc14707c80a3c7d8f (diff)
downloadvis-5f8760a614e11dc2f665ed4a23309875a6af61df.tar.gz
vis-5f8760a614e11dc2f665ed4a23309875a6af61df.tar.xz
vis: let /^pattern match at the start of the line
-rw-r--r--vis-motions.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/vis-motions.c b/vis-motions.c
index 6111d3e..e62dc35 100644
--- a/vis-motions.c
+++ b/vis-motions.c
@@ -245,7 +245,7 @@ bool vis_motion(Vis *vis, enum VisMotion motion, ...) {
case VIS_MOVE_SEARCH_BACKWARD:
{
const char *pattern = va_arg(ap, char*);
- if (text_regex_compile(vis->search_pattern, pattern, REG_EXTENDED)) {
+ if (text_regex_compile(vis->search_pattern, pattern, REG_EXTENDED|REG_NEWLINE)) {
vis_cancel(vis);
goto err;
}