Skip to content

Instantly share code, notes, and snippets.

@mattn
Last active December 14, 2015 01:59
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mattn/5010188 to your computer and use it in GitHub Desktop.
Save mattn/5010188 to your computer and use it in GitHub Desktop.
diff -r 8b86b69546a9 src/regexp.c
--- a/src/regexp.c Wed Feb 20 21:26:00 2013 +0100
+++ b/src/regexp.c Fri Feb 22 18:06:07 2013 +0900
@@ -5449,6 +5449,16 @@
}
}
else
+#ifdef FEAT_MBYTE
+ if (has_mbyte)
+ {
+ int off = (*mb_head_off)(regline,
+ regline +
+ rp->rs_un.regsave.rs_u.pos.col - 1) + 1;
+ rp->rs_un.regsave.rs_u.pos.col -= off;
+ }
+ else
+#endif
--rp->rs_un.regsave.rs_u.pos.col;
}
else
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment