Skip to content

Instantly share code, notes, and snippets.

@h-east
Created October 22, 2012 02:28
Show Gist options
  • Save h-east/3929304 to your computer and use it in GitHub Desktop.
Save h-east/3929304 to your computer and use it in GitHub Desktop.
r can't replace n and N on Vim 7.3.704
diff -r 06e088d016ad src/normal.c
--- a/src/normal.c Sun Oct 21 23:56:05 2012 +0200
+++ b/src/normal.c Mon Oct 22 11:26:36 2012 +0900
@@ -1086,7 +1086,7 @@
ca.nchar = ca.extra_char;
idx = find_command(ca.cmdchar);
}
- else if (ca.nchar == 'n' || ca.nchar == 'N')
+ else if ((ca.nchar == 'n' || ca.nchar == 'N') && !stuff_empty())
ca.oap->op_type = get_op_type(*cp, NUL);
else if (*cp == Ctrl_BSL)
{
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment