aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Bürgin <676c7473@gmail.com>2015-04-25 17:25:13 +0200
committerMichael Reed <m.reed@mykolab.com>2015-04-25 15:07:45 -0400
commitdeeee5bfab7c1bf7a62f0e309b59fccc40d092ac (patch)
tree6796b6f1d24864c3650d7a969173d32680255cd0
parent0bce4dc54427d05ab320a88f6269a9c1b05ea899 (diff)
downloadrneovim-deeee5bfab7c1bf7a62f0e309b59fccc40d092ac.tar.gz
rneovim-deeee5bfab7c1bf7a62f0e309b59fccc40d092ac.tar.bz2
rneovim-deeee5bfab7c1bf7a62f0e309b59fccc40d092ac.zip
options: Remove "g" flag from 'cpoptions' #2505
-rw-r--r--runtime/doc/options.txt2
-rw-r--r--src/nvim/ex_docmd.c5
-rw-r--r--src/nvim/option_defs.h5
3 files changed, 3 insertions, 9 deletions
diff --git a/runtime/doc/options.txt b/runtime/doc/options.txt
index 6090dd6cb0..88f2377b16 100644
--- a/runtime/doc/options.txt
+++ b/runtime/doc/options.txt
@@ -1868,8 +1868,6 @@ A jump table for the options with a short description can be found at |Q_op|.
argument will set the file name for the current
buffer, if the current buffer doesn't have a file name
yet. Also see |cpo-P|.
- *cpo-g*
- g Goto line 1 when using ":edit" without argument.
*cpo-H*
H When using "I" on a line with only blanks, insert
before the last blank. Without this flag insert after
diff --git a/src/nvim/ex_docmd.c b/src/nvim/ex_docmd.c
index f76ab923b2..f659538611 100644
--- a/src/nvim/ex_docmd.c
+++ b/src/nvim/ex_docmd.c
@@ -6037,10 +6037,7 @@ do_exedit (
setpcmark();
if (do_ecmd(0, (eap->cmdidx == CMD_enew ? NULL : eap->arg),
NULL, eap,
- /* ":edit" goes to first line if Vi compatible */
- (*eap->arg == NUL && eap->do_ecmd_lnum == 0
- && vim_strchr(p_cpo, CPO_GOTO1) != NULL)
- ? ECMD_ONE : eap->do_ecmd_lnum,
+ eap->do_ecmd_lnum,
(P_HID(curbuf) ? ECMD_HIDE : 0)
+ (eap->forceit ? ECMD_FORCEIT : 0)
// After a split we can use an existing buffer.
diff --git a/src/nvim/option_defs.h b/src/nvim/option_defs.h
index ea073d34a4..cb2a36df4d 100644
--- a/src/nvim/option_defs.h
+++ b/src/nvim/option_defs.h
@@ -95,7 +95,6 @@
#define CPO_EMPTYREGION 'E' /* operating on empty region is an error */
#define CPO_FNAMER 'f' /* set file name for ":r file" */
#define CPO_FNAMEW 'F' /* set file name for ":w file" */
-#define CPO_GOTO1 'g' /* goto line 1 for ":edit" */
#define CPO_INSEND 'H' /* "I" inserts before last blank in line */
#define CPO_INTMOD 'i' /* interrupt a read makes buffer modified */
#define CPO_INDENT 'I' /* remove auto-indent more often */
@@ -146,9 +145,9 @@
* cursor would not move */
/* default values for Vim, Vi and POSIX */
#define CPO_VIM "aABceFs"
-#define CPO_VI "aAbBcCdDeEfFgHiIjJkKlLmMnoOpPqrRsStuvwWxXyZ$!%*-+<>;"
+#define CPO_VI "aAbBcCdDeEfFHiIjJkKlLmMnoOpPqrRsStuvwWxXyZ$!%*-+<>;"
#define CPO_ALL \
- "aAbBcCdDeEfFgHiIjJkKlLmMnoOpPqrRsStuvwWxXyZ$!%*-+<>#{|&/\\.;"
+ "aAbBcCdDeEfFHiIjJkKlLmMnoOpPqrRsStuvwWxXyZ$!%*-+<>#{|&/\\.;"
/* characters for p_ww option: */
#define WW_ALL "bshl<>[],~"