Commit Graph

469 Commits

Author SHA1 Message Date
Björn Linse bfe84adb5a options: winhighlight: fix incorrect string equality test 2020-01-28 19:10:41 +01:00
Justin M. Keyes 75e8562249 refactor: move session functions to ex_session.c 2020-01-28 00:22:14 -08:00
Jan Edmund Lazo ad272cd2d7
vim-patch:8.1.1144: too strict checking of the 'spellfile' option
Problem:    Too strict checking of the 'spellfile' option.
Solution:   Allow for a path.
862f1e17ea
2020-01-26 17:38:31 -05:00
Jan Edmund Lazo 08c5a874ab
vim-patch:8.1.1143: may pass weird strings to file name expansion
Problem:    May pass weird strings to file name expansion.
Solution:   Check for matching characters.  Disallow control characters.
8f130eda47
2020-01-26 17:38:30 -05:00
Billy SU e53e860759 vim-patch:8.1.0061: fix resetting, setting 'title' #11733
Problem:    Window title is wrong after resetting and setting 'title'.
Solution:   Move resetting the title into maketitle(). (Jason Franklin)
84a9308511
2020-01-21 23:47:32 -08:00
Björn Linse b3974e4437 restore old 'termencoding' behavior
Partially reverts #11647. Replaces #11662

The old implementation was removed without clear motivation. The "term option"
hackaround added in its place is neither shorter nor simpler.

The new behavior breaks even init.vim that expliticly check against it:

    if exists('&termencoding')
      set termencoding=utf-8
    endif

There was nothing wrong with the 0.4.x behavior. Empty &tenc has
indicated that the &enc value should be used for all the history of
Nvim. Ignoring setting the option is the expected behavior for Vim
versions that does not support the option (and Nvim is such a version)

'tenc' was also irrelevant to the Test_unicode python3 test.
The reason this has to be disabled is that neovim can't change
internal 'encoding'
2020-01-19 16:07:52 +01:00
erw7 1e4f290691 Remove termtype option 2020-01-17 11:36:28 +01:00
erw7 a5a3d7160d Change option name from termwintype to termtype 2020-01-17 11:36:28 +01:00
erw7 8f91d709b0 Rename from os_win_conpty.{c,h} to pty_conpty_win.{c,h} 2020-01-17 11:36:28 +01:00
erw7 5355cee77d Change to use ConPTY, if available 2020-01-17 11:36:28 +01:00
Matthieu Coudron 05ea3c1997 defaults: set fillchars "foldsep" to box line #11702
"│" U+2502 BOX DRAWINGS LIGHT VERTICAL

Fallback to old default | if 'ambiwidth' is set.
2020-01-11 16:36:11 -08:00
Jan Edmund Lazo 77b61cb0df option: restore termencoding (readonly) #11662
'termencoding' option was removed in abaabd1d03
but some plugins check its value.
2020-01-02 21:42:52 -08:00
Matthieu Coudron bbad324b17 fillchars: adding foldopen, foldsep, foldclose
You can try it with
set fillchars+=foldopen:▾,foldsep:│,foldclose:▸
2019-12-25 14:28:36 +01:00
butwerenotthereyet 39094b3fae jumplist: browser-style (or 'tagstack') navigation #11530
Traditionally, when navigating to a specific location from the middle of
the jumplist results in shifting the current location to the bottom of
the list and adding the new location after it.  This behavior is not
desireable to all users--see, for example
https://vi.stackexchange.com/questions/18344/how-to-change-jumplist-behavior.

Here, another jumplist behavior is introduced.  When jumpoptions (a new
option set added here) includes stack, the jumplist behaves like the
tagstack or like history in a web browser.  That is, when navigating to
a location from the middle of the jumplist

    2 first
    1 second
    0 third <-- current location
    1 fourth
    2 fifth

to a new location the locations after the current location in the jump
list are discarded

    2 first
    1 second
    0 third
            <-- current location

The result is that when moving forward from that location, the new
location will be appended to the jumplist:

    3 first
    2 second
    1 third
    0 new

If the new location is the same

  new == second

as some previous (but not immediately prior) entry in the jumplist,

    2 first
    1 second
    0 third <-- current location
    1 fourth
    2 fifth

both occurrences preserved

    3 first
    2 second
    1 third
    0 second (new)

when moving forward from that location.

It would be desireable to go farther and, when the new location is the
same as the location that is currently next in the jumplist,

    new == fourth

make the result of navigating to the new location by jumping (e.g. 50gg)
be the same as moving forward in the jumplist

    2 first
    1 second
    0 third
    1 new <-- current location
    2 fifth

and simply increment the jumplist index.  That change is NOT part of
this patch because it would require passing the new cursor location to
the function (setpcmark) from all of its callees.  That in turn would
require those callees to know *before* calling what the new cursor
location is, which do they do not currently.
2019-12-10 00:56:56 -08:00
Björn Linse 5f9209389b
Merge pull request #11445 from bfredl/fcslcs
options: make 'fillchars' and 'listchars' global-local instead of local-only
2019-11-26 22:10:13 +01:00
Björn Linse 49a40f425d options: make 'fillchars' and 'listchars' global-local
These options were previously global. A global-local window option
behaves closer to a global option "per default" (i e with :set),
but still supports local behavior via :setl

Also this restores back-compat for nvim_set_option("fcs", ...)
which are currently broken on 0.4.x but worked in earlier versions
2019-11-26 19:14:54 +01:00
Justin M. Keyes 36d1335a66
UI: emit mouse_on/mouse_off on attach #11455
closes #11372
2019-11-25 08:56:42 -08:00
Rob Pilling 194f7bface vim-patch:8.1.1228: not possible to process tags with a function
Problem:    Not possible to process tags with a function.
Solution:   Add tagfunc() (Christian Brabandt, Andy Massimino, closes vim/vim#4010)
45e18cbdc4
2019-10-22 20:13:02 +01:00
Daniel Hahler a341eb6087 win_line: update `w_last_cursorline` always
Vim patch 8.1.0856 (54d9ea6) caused a performance regression in Neovim,
when `set conceallevel=1 nocursorline` was used, since then due to
refactoring in 23c71d5 `w_last_cursorline` would never get updated
anymore.

Adds/uses `redrawdebug+=nodelta` for testing this.

Fixes https://github.com/neovim/neovim/issues/11100.
Closes https://github.com/neovim/neovim/pull/11101.
2019-10-04 08:48:57 +02:00
Justin M. Keyes 3344cffe7b getdigits: introduce `strict`, `def` parameters
Problem:
During a refactor long ago, we changed the `getdigits_*` familiy of
functions to abort on overflow.  But this is often wrong, because many
of these codepaths are handling user input.

Solution:
Decide at each call-site whether to use "strict" mode.

fix #5555
2019-09-13 19:29:25 -07:00
Jan Edmund Lazo 6508215b5c
Remove excess <stdint.h> 2019-09-11 22:27:45 -04:00
erw7 9db60b06a1 vim-patch:8.1.0515: reloading a script gives errors for existing functions
Problem:    Reloading a script gives errors for existing functions.
Solution:   Allow redefining a function once when reloading a script.
ded5f1bed7
2019-09-04 13:40:05 +09:00
erw7 2926a36d91 [squash] Fix errors when porting 2019-09-04 13:40:05 +09:00
erw7 a2e48b556b vim-patch:8.1.0362: cannot get the script line number when executing a function
Problem:    Cannot get the script line number when executing a function.
Solution:   Store the line number besides the script ID. (Ozaki Kiichi,
            closes vim/vim#3362)  Also display the line number with ":verbose set".
f29c1c6aa3
2019-09-04 13:40:04 +09:00
Jan Edmund Lazo c0cb7585cc
vim-patch:8.1.0046: loading a session file fails if 'winheight' is big
Problem:    Loading a session file fails if 'winheight' is a big number.
Solution:   Set 'minwinheight' to zero at first.  Don't give an error when
            setting 'minwinheight' while 'winheight' is a big number.
            Fix using vertical splits. Fix setting 'minwinwidth'.
            (closes vim/vim#2970)
1c3c10492a
2019-09-02 19:54:06 -04:00
Jan Edmund Lazo 07b209b1fe
vim-patch:8.0.1768: SET_NO_HLSEARCH() used in a wrong way
Problem:    SET_NO_HLSEARCH() used in a wrong way.
Solution:   Make it a function. (suggested by Dominique Pelle,
            closes vim/vim#2850)
451fc7b954
2019-09-02 18:40:56 -04:00
Jan Edmund Lazo 7bb029eeef vim-patch:8.0.0858: check if job terminal is running #10908
Problem:    Can exit while a terminal is still running a job.
Solution:   Consider a buffer with a running job like a changed file.
eb44a68b42
2019-09-01 22:54:49 -07:00
Björn Linse b51ba122c1 screen: use dedicated message grid
add proper msg_set_pos event, delet win_scroll_over_*

make compositor click through unfocusable grids

add MsgArea attribute for the message/cmdline area, and add docs and tests
2019-09-01 15:55:10 +02:00
Daniel Hahler b2d6a6891e findoption_len: treat viminfo/viminfofile as aliases
Ref: https://github.com/neovim/neovim/pull/10672#issuecomment-524716824
2019-08-26 09:39:00 +02:00
Daniel Hahler bec2336231
vim-patch:8.1.1913: not easy to compute the space on the command line (#10845)
Problem:    Not easy to compute the space on the command line.
Solution:   Add v:echospace. (Daniel Hahler, closes vim/vim#4732)
37f4cbd46f
2019-08-25 20:53:17 +02:00
Justin M. Keyes 02c52a18f5 style 2019-08-13 22:22:47 +02:00
Justin M. Keyes cbfd18c85a startup: handle 'guicursor' after user config
If parse_shape_opt() is done before user config, the TUI may cause
unwanted changes to the terminal cursor which cannot later be undone
(see #4396).

fix #10750
2019-08-13 22:19:00 +02:00
Justin M. Keyes ad4eb18e43 Merge #10098 'win: fix msg_puts_printf()' 2019-08-12 02:42:13 +02:00
Bartosz Miera 16727dcf1e clang/"dead assignments" #10620
Also revert possibly-wrong change in f_sign_getplaced() from
652be3cb00.
2019-07-29 00:52:24 +02:00
Björn Linse aa28e070e9 refactor: use int for Columns and Rows 2019-07-19 15:57:19 +02:00
Jan Edmund Lazo 263d62f628 vim-patch:8.1.0495: :filter only supports some commands
Problem:    :filter only supports some commands.
Solution:   Add :filter support for more commands. (Marcin Szamotulski,
            closes vim/vim#2856)
f86db78fed
2019-07-15 23:07:28 -04:00
Björn Linse 2c2f160a27 ui: add 'redrawdebug' option for flexible debugging of redrawing 2019-07-09 15:13:24 +02:00
Björn Linse 524fe6205d
Merge pull request #10090 from bfredl/floatpopup
api/window: add style="minimal" flag to disable unwanted UI features for simple floats
2019-07-07 21:35:55 +02:00
Björn Linse ef3e32d57e api/window: add style="minimal" flag to nvim_open_win() 2019-07-07 20:52:15 +02:00
Jan Edmund Lazo 8062e6ff88 vim-patch:8.1.1614: 'numberwidth' can only go up to 10
Problem:    'numberwidth' can only go up to 10.
Solution:   Allow up to 20. (Charlie Stanton, closes vim/vim#4584)
f8a0712655
2019-07-05 21:26:46 -04:00
Justin M. Keyes 097f85ae6c
defaults: wildoptions=pum,tagfile #10384
ref #6289
2019-07-01 23:59:24 +02:00
Björn Linse 4c4d964eeb ui: add 'winblend' to support blending of floating windows
Also add `hi blend=` attribute to override transparency of indiviual attributes.
2019-06-25 18:08:21 +02:00
James McCoy 1e4673d167
vim-patch:8.1.1366: using expressions in a modeline is unsafe
Problem:    Using expressions in a modeline is unsafe.
Solution:   Disallow using expressions in a modeline, unless the
            'modelineexpr' option is set.  Update help, add more tests.
110289e781
2019-06-24 06:45:55 -04:00
Daniel Hahler 66613ace48 vim-patch:8.0.1704: 'backupskip' default doesn't work for Mac
Problem:    'backupskip' default doesn't work for Mac.
Solution:   Use "/private/tmp". (Rainer Müller, closes vim/vim#2793)
b8e22a053b
2019-06-13 00:28:16 +02:00
erw7 1fbc01f4ab Fix problems with message catalog directory
- In appimage, the message catalog is not used because there is no
  message catalog in LOCALE_INSTALL_DIR. Therefore, change to
  exepath/../share/locale instead of LOCALE_INSTALL_DIR.
- The old vim style($runtime/lang) is no longer used. Thus all relevant
  code is removed.
2019-06-09 13:28:10 +09:00
erw7 777c2a25ce vim-patch:8.1.1270: cannot see current match position
Problem:    Cannot see current match position.
Solution:   Show "3/44" when using the "n" command and "S" is not in
            'shortmess'. (Christian Brabandt, closes vim/vim#4317)
9dfa313919
2019-06-05 09:54:52 +09:00
Jan Edmund Lazo e664c2a158 vim-patch:8.1.0205: invalid memory access with invalid modeline
Problem:    Invalid memory access with invalid modeline.
Solution:   Pass pointer limit. Add a test. (closes vim/vim#3241)
9cf4b5005f
2019-05-25 15:18:31 -04:00
Jan Edmund Lazo fb02e9f1e9 vim-patch:8.1.1046: the "secure" variable is used inconsistently
Problem:    the "secure" variable is used inconsistently. (Justin M. Keyes)
Solution:   Set it to one instead of incrementing.
82b033eff8
2019-05-05 11:40:19 -04:00
Jan Edmund Lazo 9c6476d81e vim-patch:8.1.0613: when executing an insecure function the secure flag is stuck
Problem:    When executing an insecure function the secure flag is stuck.
            (Gabriel Barta)
Solution:   Restore "secure" instead of decrementing it. (closes vim/vim#3705)
48f377a476
2019-05-05 11:38:21 -04:00
Justin M. Keyes 769f44e918 win/defaults: Use "…/nvim-data/site" in 'runtimepath'
On Windows we store non-config data in "$XDG_DATA_HOME/nvim-data". But
the "…/site" items in 'runtimepath' did not correctly point to that
location, they used "…/nvim/site".

Fix the init logic to use  "…/nvim-data/site".

closes #9910
2019-04-28 00:27:07 +02:00