aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/ex_docmd.c
Commit message (Collapse)AuthorAge
...
* src/*: Remove `VIM - Vi improved ...` headerMichael Reed2015-11-27
| | | | | | | | | | | | | | | | | | | Regarding the individual items in the header: `Vim - Vi improved by Bram Moolenar` Bram Moolenar is already mentioned throughout the documentation, as well as the intro screen. `:help uganda` It's already shown to all users who don't use `shortmess+=I` upon starting nvim, and is already placed prominently in help.txt, i.e., `:help` run with no arguments. `:help credits` Already mentioned near the top of help.txt. `README.md` Already mentioned in develop.txt.
* Remove unnecessary includes for errno.hRui Abreu Ferreira2015-11-25
|
* src: README.txt -> README.mdMichael Reed2015-11-23
| | | | | The former no longer exists in this repo; see the top of src/nvim/README.md.
* ex_cmds.lua: Use ex_ni directlyMichael Reed2015-11-15
| | | | | | | | | | | | | | | | As can be seen in [1], the ifdefs are leftovers from Vim, where tons of features are optional. This is not the case in Nvim, so the macros are of little use. Besides, ex_ni is already used in a bunch of places, just not consistently. The ex_language macro was left untouched as the inclusion of ``:language'' actually is determined at compile time, unlike the other commands which _always_ print "this command is not available in this version". [1]: https://github.com/vim/vim/blob/master/src/ex_docmd.c#L18-L497 Reviewed-by: Justin M. Keyes <justinkz@gmail.com>
* Remove :open commandMichael Reed2015-11-07
| | | | | | | | | | | | | | | | | | | | | From the documentation itself: :[range]o[pen] Works like |:visual|: end Ex mode. {Vi: start editing in open mode} ... Vim does not support open mode, since it's not really useful. For those situations where ":open" would start open mode Vim will leave Ex mode, which allows executing the same commands, but updates the whole screen instead of only one line. Part of the reason behind this is to make removing vi_diff.txt easier, although it's also because :open is not too useful. Helped-by: @fdinoff Helped-by: @dsummersl Helped-by: @mhinz Helped-by: @justinmk
* undo: Do some refactoringZyX2015-10-29
| | | | | | Specifically refactor u_get_undo_file_name which will be modified to automatically create undo directory and replace `char_u` with `char` in some of the related functions.
* main: Extract `normal_check` from `main_loop`Thiago de Arruda2015-10-26
| | | | | | The new function contains logic that must be executed after handling input in normal mode and also before the first main loop iteration. Also rename `main_loop` to `normal_enter` and move it to normal.c
* shada: Translate errors and add error codesZyX2015-10-08
| | | | | | | | | | Notes: - E136 code greatly changed its meaning: now it is write error and not read error. - E195 was removed because shada_read_everything will already do all the necessary error reporting. - E886 can be reported by both :rshada and :wshada, but :rshada comes first and AFAIR it is the only error which is not E575 and can be reported by :rshada.
* Deprecate &viminfo and :[rw]v, add &shada and :[rw]shZyX2015-10-08
|
* Replace references to viminfo in various placesZyX2015-10-08
|
* viminfo: First version of ShaDa file dumpingZyX2015-10-08
| | | | | | | | | | | | | | | | | | | | What works: 1. ShaDa file dumping: header, registers, jump list, history, search patterns, substitute strings, variables. 2. ShaDa file reading: registers, global marks, variables. Most was not tested. TODO: 1. Merging. 2. Reading history, local marks, jump and buffer lists. 3. Documentation update. 4. Converting some data from &encoding. 5. Safer variant of dumping viminfo (dump to temporary file then rename). 6. Removing old viminfo code (currently masked with `#if 0` in a ShaDa file for reference).
* ex_docmd: Fix terminal mode check condition for ex_normalThiago de Arruda2015-10-01
| | | | | | | | | Using the `curbuf->terminal` condition alone is wrong since it does not necessarily mean nvim is in terminal mode. It needs to be used with `State & TERM_FOCUS` because the current buffer could have changed without `terminal_enter` exiting. Close #3403
* terminal: Don't enter terminal mode from `:normal`Thiago de Arruda2015-09-18
| | | | Ref: https://github.com/junegunn/fzf.vim/issues/8#issuecomment-139209765
* clipboard: avoid clipboard during :global. #2809Felipe Morales2015-08-30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is equivalent to patches 7.4.396, 7.4.445 and 7.4.598. vim-patch:7.4.396 Problem: When 'clipboard' is "unnamed", :g/pat/d is very slow. (Praful) Solution: Only set the clipboard after the last delete. (Christian Brabandt) https://github.com/vim/vim/commit/1f285eb49a709e00552f7bef7e74efff5ae79026 vim-patch:7.4.445 Problem: Clipboard may be cleared on startup. Solution: Set clip_did_set_selection to -1 during startup. (Christian Brabandt) https://github.com/vim/vim/commit/1a19d37d90f037c09183ba68fdddf70ab8ee179a vim-patch:7.4.598 Problem: ":tabdo windo echo 'hi'" causes "* register not to be changed. (Salman Halim) Solution: Change how clip_did_set_selection is used and add clipboard_needs_update and global_change_count. (Christian Brabandt) https://github.com/vim/vim/commit/af6a579263a688f30bfbbee72b28d08cc7e0f3d4 Co-Author: @bfredl
* os/fs: Move mkdir_recurse from eval.c to os/fs.cZyX2015-07-26
|
* ex_docmd: Make E739 message contain strerror() outputZyX2015-07-26
|
* Remove ':Print' command #3049Michael Reed2015-07-20
| | | | | | | | | | | | | | There's no way this isn't some long-running joke: "Just as ':print'. Was apparently added to Vi for people that keep the shift key pressed too long..." Note: A user command can overrule this command. Regarding ':X': the command has been removed for a while, but the documentation must have been missed, so remove it here. Reviewed-by: Justin M. Keyes <justinkz@gmail.com> Helped-by: @jusga
* Remove POSIX 'cpoptions': '.'Michael Reed2015-07-19
|
* rstream/wstream: Unify structures and simplify APIThiago de Arruda2015-07-17
| | | | | | | | | | | | | - Simplify RStream/WStream API and make it more consistent with libuv. - Move into the event loop layer(event subdirectory) - Remove uv_helpers module. - Simplify job/process internal modules/API. - Unify RStream and WStream into a single structure. This is necessary because libuv streams can be readable and writable at the same time(and because the uv_helpers.c hack to associate multiple streams with libuv handle was removed) - Make struct definition public, allowing more flexible/simple memory management by users of the module. - Adapt channel/job modules to cope with the changes.
* Remove :tearoff #3007Marco Hinz2015-07-15
| | | | | | | | This also removes the 't' flag from 'guioptions'. Side effect: :term[inal] -> :te[rminal] Closes #3003.
* Enable -Wconversion: menu.c #2885Ismail Badawi2015-06-25
|
* ex_docmd.c: :edit is a no-op in terminal buffers #2822Felipe Morales2015-06-14
| | | | Closes #2779
* 'cpoptions': Remove "-" flag #2655David Bürgin2015-05-21
|
* Remove char_u: message:smsg()Michael Reed2015-05-13
|
* Remove char_u: ex_docmd:get_view_file()Michael Reed2015-05-13
|
* Remove char_u: ex_docmd:do_cmdline_cmd()Michael Reed2015-05-13
|
* 'cpoptions': Remove "*" flag #2554David Bürgin2015-05-08
| | | | | | | | | | The "*" flag in 'cpoptions' makes the command :* execute the contents of a register. Removed because 1. the same functionality exists as :@ 2. it hides :* as a useful command-line shortcut for :'<,'> 3. unlike :@ it cannot be used with the * register Helped-by: Michael Reed <m.reed@mykolab.com>
* Remove char_u: FullName_save()Mark Bainter2015-05-06
|
* Remove char_u: vim_FullName()Mark Bainter2015-05-06
|
* Remove char_u: add_pathsep()Mark Bainter2015-05-06
|
* unify jobstart, termopen, and system interfacesScott Prager2015-05-02
| | | | | | | | | | | | | | | | | For any of these functions, if {cmd} is a string, execute "&shell &shellcmdflag '{cmd}'", or simply {cmd} if it's a list. In termopen(), if the 'name' option is not supplied, try to guess using '{cmd}' (string) or {cmd}[0] (list). Simplify ex_terminal to use the string form of termopen(). termopen: get name from argument Convert list_to_argv to tv_to_argv. Helped-by: Björn Linse <@bfredl> Helped-by: oni-link <knil.ino@gmail.com> Helped-by: Thiago de Arruda <@tarruda>
* term: use an argument vector for termopen().Scott Prager2015-05-02
| | | | | | | | | | | | | | | | | | | | | | Old behaviour: termopen('cmd') would run `&shell &shcf "cmd"`, which caused the functional tests to fail on some systems due to the process not "owning" the terminal. Also, it is inconsistent with jobstart(). Modify termopen() so that &shell is not invoked, but maintain the old behaviour with :terminal. Factor the common code for building the argument vector from jobstart() and modify the functional tests to call termopen() instead of :terminal (fixes #2354). Also: * Add a 'name' option for termopen() so that `:terminal {cmd}` produces a buffer named "term//{cwd}/{cmd}" and termopen() users can customize the name. * Update the documentation. * Add functional tests for `:terminal` sinse its behaviour now differs from termopen(). Add "test/functional/fixtures/shell-test.c" and move "test/functional/job/tty-test.c" there, too. Helped-by: Justin M. Keyes <@justinmk>
* Fix warnings: ex_docmd.c: ex_tabonly(): Np dereference: FP.Eliseo Martínez2015-05-01
| | | | | | | | | | | | Problem : Dereference of null pointer @ 5816. Diagnostic : False positive. Rationale : first_tabpage is assumed to be NULL after calling goto_tabpage(), which should not be possible (first_tabpage should be not NULL before calling it, and only changed to another valid tab page). Resolution : Assert first_tabpage after calling goto_tabpage(). Helped-by: oni-link <knil.ino@gmail.com>
* vim-patch:7.4.580Felipe Morales2015-04-28
| | | | | | | | Problem: ":52wincmd v" still gives an invalid range error. (Charles Campbell) Solution: Skip over white space. https://code.google.com/p/vim/source/detail?name=v7-4-580
* vim-patch:7.4.572Felipe Morales2015-04-28
| | | | | | | Problem: Address type of :wincmd depends on the argument. Solution: Check the argument. https://code.google.com/p/vim/source/detail?r=v7-4-572
* vim-patch:7.4.568Felipe Morales2015-04-28
| | | | | | | | Problem: Giving an error for ":0wincmd w" is a problem for some plugins. Solution: Allow the zero in the range. (Marcin Szamotulski) https://code.google.com/p/vim/source/detail?r=v7-4-568
* vim-patch:7.4.565Felipe Morales2015-04-28
| | | | | | | | | | | Problem: Ranges for arguments, buffers, tabs, etc. are not checked to be valid but limited to the maximum. This can cause the wrong thing to happen. Solution: Give an error for an invalid value. (Marcin Szamotulski) Use windows range for ":wincmd". https://code.google.com/p/vim/source/detail?r=v7-4-565
* vim-patch:7.4.561Felipe Morales2015-04-28
| | | | | | | | Patch 7.4.561 Problem: Ex range handling is wrong for buffer-local user commands. Solution: Check for CMD_USER_BUF. (Marcin Szamotulski) https://code.google.com/p/vim/source/detail?name=v7-4-561
* vim-patch:7.4.542Felipe Morales2015-04-28
| | | | | | | | | | Problem: Using a range for window and buffer commands has a few problems. Cannot specify the type of range for a user command. Solution: Add the -addr argument for user commands. Fix problems. (Marcin Szamotulski https://code.google.com/p/vim/source/detail?name=v7-4-542
* vim-patch:7.4.539Felipe Morales2015-04-28
| | | | | | | | | | Patch 7.4.539 (after 7.4.530) Problem: Crash when computing buffer count. Problem with range for user commands. Line range wrong in Visual area. Solution: Avoid segfault in compute_buffer_local_count(). Check for CMD_USER when checking type of range. (Marcin Szamotulski) https://code.google.com/p/vim/source/detail?name=v7-4-539
* vim-patch:7.4.535Felipe Morales2015-04-28
| | | | | | | | | | Patch 7.4.535 (after 7.4.530) Problem: Can't build with tiny features. Solution: Add #ifdefs and skip a test. https://code.google.com/p/vim/source/detail?name=v7-4-535 This is also a refactor of some code in 7.4.530.
* vim-patch:7.4.530-531Felipe Morales2015-04-28
| | | | | | | | | | | | | | | | | | | | | | | Specify different kinds of counts for commands. Updated ex commands generator scripts. Includes fixes to comments from patch 7.4.531 Original message: Problem: Many commands take a count or range that is not using line numbers. Solution: For each command specify what kind of count it uses. For windows, buffers and arguments have "$" and "." have a relevant meaning. (Marcin Szamotulski) https://code.google.com/p/vim/source/detail?r=v7-4-530 https://code.google.com/p/vim/source/detail?r=v7-4-531 Add legacy tests for 7.4.530 https://code.google.com/p/vim/source/detail?r=1e6d87a36dcdca231721dde8cbbc26610fb3df27
* Enable -Wconversion: normal.c.Eliseo Martínez2015-04-27
| | | | | | | | | | | | | | | | | | | | | | | | Refactor summary: - extern int opcount --> extern long opcount - bool find_decl(..., int len, ...) --> bool find_decl(..., size_t len, ...) * int find_ident_under_cursor(...) --> size_t find_ident_under_cursor(...) - int find_ident_at_pos(...) --> size_t find_ident_at_pos(...) - int modify_fname(..., int *usedlen, ..., int *fnamelen) --> int modify_fname(..., size_t *usedlen, ..., size_t *fnamelen) * char_u *eval_vars(..., int *usedlen, ...) --> char_u *eval_vars(..., size_t *usedlen, ...) - int find_cmdline_var(..., int *usedlen) --> ssize_t find_cmdline_var(..., size_t *usedlen) - static char_u *repl_cmdline(..., int srclen, ...) --> static char_u *repl_cmdline(..., size_t srclen, ...) - bool get_visual_text(..., int *lenp) --> bool get_visual_text(..., size_t *lenp) * char_u *find_file_name_in_path(..., int len, ...) --> char_u *find_file_name_in_path(..., size_t len, ...) - static char_u *eval_includeexpr(..., int len) --> static char_u *eval_includeexpr(..., size_t len) - char_u *find_file_in_path(..., int len, ...) --> char_u *find_file_in_path(..., size_t len, ...) * char_u *find_file_in_path_option(..., int len, ...) --> char_u *find_file_in_path_option(..., size_t len, ...) - char_u *find_directory_in_path(..., int len, ...) --> char_u *find_directory_in_path(..., size_t len, ...) * int spell_move_to(...) --> size_t spell_move_to(...) - int spell_check(...) --> size_t spell_check(...) - static int spell_bad_len --> static size_t spell_bad_len - void find_pattern_in_path(..., int len, ...) --> void find_pattern_in_path(..., size_t len, ...) Helped-by: Justin M. Keyes <justinkz@gmail.com>
* options: Remove "g" flag from 'cpoptions' #2505David Bürgin2015-04-25
|
* Replace vim_isspace() with ascii_isspace() defined in ascii.hFelipe Oliveira Carvalho2015-04-24
|
* Replace VIM_ISDIGIT() and vim_isdigit() with ascii_isdigit() defined in ascii.hFelipe Oliveira Carvalho2015-04-24
|
* Replace vim_iswhite with ascii_iswhite() defined in ascii.hFelipe Oliveira Carvalho2015-04-24
|
* clipboard: cleanup `valid_yank_reg` and use it for `:redir`Björn Linse2015-04-17
| | | | | | | This fixes missing clipboard support for `:redir` Helped-By: Michael Reed <m.reed@mykolab.com> Helped-By: Scott Prager <splinterofchaos@gmail.com>
* clipboard: simplify handling of of put in visual mode.Björn Linse2015-04-17
| | | | | When clipboard=unnamed and put over visual selection, reduces number of provider calls from 6 to 2. Also add test.
* ops.c: eliminate static variable `y_current`Björn Linse2015-04-17
| | | | | | | This variable isn't stateful, and should be passed around instead. Helped-By: Scott Prager <splinterofchaos@gmail.com> Helped-By: Michael Reed <m.reed@mykolab.com>