Commit Graph

141 Commits

Author SHA1 Message Date
Justin M. Keyes a24eff0e27 extmark: fix spelling of "Extmark"
The spelling "Extmark" is used almost everywhere, so don't spell it
"ExtMark" inconsistently.
2019-11-11 22:12:59 -08:00
Björn Linse 18a8b702c0 extmark: review changes 2019-11-11 20:18:15 +01:00
timeyyy a9065a5051 nsmarks: initial commit 2019-11-11 19:43:15 +01: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
Justin M. Keyes 8b06231612 Merge #10869 'vim-patch:8.1.{0309,0362,0365,0515,1946}' 2019-09-05 14:10:32 -07:00
Björn Linse d5162afa2a anchor float to buffer position
vim-patch:8.1.1645: cannot use a popup window for a balloon
2019-09-04 23:57:02 +02: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
Justin M. Keyes feee862064 vim-patch:8.0.1193: crash when wiping buffer after getbufinfo()
Problem:    Crash when wiping out a buffer after using getbufinfo().
            (Yegappan Lakshmanan)
Solution:   Remove b:changedtick from the buffer variables.

(Note: The test changes in vim-patch:8.0.1193 were already included.)
2019-08-12 02:17:49 +02:00
Björn Linse c0993ed343 lua: support getting UTF-32 and UTF-16 sizes of replaced text 2019-08-06 20:24:36 +02:00
Björn Linse b0e26199ec lua: add {old_byte_size} to on_lines buffer change event 2019-08-06 17:01:47 +02:00
Jan Edmund Lazo 0d5f629208 Revert "vim-patch:8.0.1723: using one item array size declaration is misleading" (#10583)
This reverts commit 315076a26d.
2019-07-23 05:37:20 +02:00
Björn Linse ef3e32d57e api/window: add style="minimal" flag to nvim_open_win() 2019-07-07 20:52:15 +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
Jan Edmund Lazo 315076a26d vim-patch:8.0.1723: using one item array size declaration is misleading
Problem:    Using one item array size declaration is misleading.
Solution:   Instead of using "[1]" and actually using a larger array, use
            "[]".  This is to verify that this C99 feature works for all
            compilers.
f3a411783c

The following patch is N/A because Neovim requires C99.
vim-patch:8.0.1735: flexible array member feature not supported by HP-UX
2019-06-19 01:36:00 -04:00
Björn Linse 64cdf9f78a api/lua: add on_detach to nvim_buf_attach 2019-06-15 13:19:12 +02:00
Björn Linse f5c56f03bb api: allow nvim_buf_attach from lua using callbacks 2019-06-04 13:45:20 +02:00
Andrej Zieger 80f40f0203 lint 2019-05-26 19:32:32 +02:00
Justin M. Keyes 8330cc22af
vim-patch:8.1.1205: BufReadPre may move the cursor #9980
Problem:    A BufReadPre autocommand may cause the cursor to move.
Solution:   Restore the cursor position after executing the autocommand,
            unless the autocommand moved it. (Christian Brabandt,
            closes vim/vim#4302, closes vim/vim#4294)
a68e595909
2019-05-08 18:01:21 +02:00
Jan Edmund Lazo bbc32fc831 lint 2019-04-23 00:03:47 -04:00
Jan Edmund Lazo 07a182c6b5 vim-patch:8.0.0647: syntax highlighting can make cause a freeze
Problem:    Syntax highlighting can make cause a freeze.
Solution:   Apply 'redrawtime' to syntax highlighting, per window.
06f1ed2f78
2019-04-23 00:03:47 -04:00
Marco Hinz 357f95a77e
cursormoved: make global last_cursormoved window-local
Fixes https://github.com/neovim/neovim/issues/9755
2019-03-29 10:58:53 +01:00
Dan Aloni 36762a00a8 signs: support multiple columns #9295
closes #990
closes #9295

- Support for multiple auto-adjusted sign columns.
  With this change, having more than one sign on a line, and with the
  'auto' setting on 'signcolumn', extra columns will shown automatically
  to accomodate all the existing signs.

  For example, suppose we have this view:

   5147             }
   5148
   5149             return sign->typenr;
   5150         }
   5151     }
   5152     return 0;
   5153 }
   5154

  We have GitGutter installed, so it tells us about modified lines that
  are not commmited. So let's change line 5152:

     5147             }
     5148
     5149             return sign->typenr;
     5150         }
     5151     }
   ~ 5152     return 0;
     5153 }
     5154

  Now we add a mark over line 5152 using 'ma' in normal mode:

      5147             }
      5148
      5149             return sign->typenr;
      5150         }
      5151     }
  a ~ 5152     return 0;
      5153 }
      5154

  Previously, Vim/Nvim would have picked only one of the signs,
  because there was no support for having multiple signs in a line.

- Remove signs from deleted lines.
  Suppose we have highlights on a group of lines and we delete them:

   +     6 use std::ops::Deref;
   --+   7 use std::borrow::Cow;
   --+   8 use std::io::{Cursor};
         9 use proc_macro2::TokenStream;
        10 use syn::export::ToTokens;
   --+  11 use std::io::Write;
   >>   12 use std::ops::Deref;

  Without this change, these signs will momentarily accumulate in
  the sign column until the plugins wake up to refresh them.

  + --+ --+ --+ >>  6

  Discussion: It may be better to extend the API a bit and allow this
  to happen for only certain types of signs. For example, VIM marks
  and vim-gitgutter removal signs may want to be presreved, unlike
  line additions and linter highlights.

- 'signcolumn': support 'auto:NUM' and 'yes:NUM' settings
- sort signs according to id, from lowest to highest. If you have
  git-gutter, vim-signature, and ALE, it would appear in this order:
  git-gutter - vim-signature - ALE.
- recalculate size before screen update
- If no space for all signs, prefer the higher ids (while keeping the
  rendering order from low to high).
- Prevent duplicate signs. Duplicate signs were invisible to the user,
  before using our extended non-standard signcolumn settings.
- multi signcols: fix bug related to wrapped lines.
  In wrapped lines, the wrapped parts of a line did not include the extra
  columns if they existed. The result was a misdrawing of the wrapped
  parts. Fix the issue by:
    1. initializing the signcol counter to 0 when we are on a wrap boundary
    2. allowing for the draw of spaces in that case.
2019-03-25 02:17:47 +01:00
Marco Hinz 9ef8d0d6b0
Merge pull request #9726 from mhinz/nvim_win_get_config
Closes #9723
2019-03-17 02:34:50 +01:00
Justin M. Keyes 7c38994ff2
aucmd_prepbuf: also restore `prevwin` #9741
bisected to f5d5da3917

Other test steps:

    nvim -u NORC
    :terminal tree /    " Produces lots of output
    :edit somefile.txt
    :vsplit
    :vsplit
    <c-w>l
    <c-w>l
    <c-w>h
    <c-w>p
2019-03-17 02:09:06 +01:00
Marco Hinz 073ab7cda8
api: refactor FloatRelative usage 2019-03-16 15:34:16 +01:00
Marco Hinz 96edbe7b1d
api: add width/height to FloatConfig 2019-03-16 12:35:58 +01:00
Marco Hinz 98391cd6ab
api: refactor FloatAnchor usage 2019-03-16 12:35:57 +01:00
Björn Linse 9a1675b065 floats: implement floating windows
Co-Author: Dongdong Zhou <dzhou121@gmail.com>
2019-03-02 16:29:50 +01:00
Justin M. Keyes 33ce70c883
vim-patch:8.1.0932: remove Farsi support (#9622)
Problem:    Farsi support is outdated and unused.
Solution:   Delete the Farsi support.
14184a3133
2019-02-17 10:54:00 +01:00
Andrew Pyatkov 894f6bee54 :terminal : set topline based on window height #8325
closes #8324
closes #8556
2019-01-29 03:00:48 +01:00
Marco Hinz 28f87c505d
Merge #9539 "options: make 'listchars' and 'fillchars' local to window" 2019-01-28 00:45:59 +01:00
Björn Linse 30bd1c1e85 terminal: handle size when switching buffers in window 2019-01-27 12:07:06 +01:00
Björn Linse 2ab70cb55c window/ui: reorganize size variables, fix terminal window size with multigrid.
wp->w_height_inner now contains the "inner" size, regardless if the
window has been drawn yet or not. It should be used instead of
wp->w_grid.Rows, for stuff that is not directly related to accessing
the allocated grid memory, such like cursor movement and terminal size
2019-01-27 12:07:06 +01:00
Marco Hinz 2ae97f3d4c
vim-patch:8.1.0759: showing two characters for tab is limited
Problem:    Showing two characters for tab is limited.
Solution:   Allow for a third character for "tab:" in 'listchars'. (Nathaniel
            Braun, Ken Takata, closes vim/vim#3810)

83a52171ba
2019-01-26 14:45:48 +01:00
Marco Hinz 352811fe5f
options: make 'fillchars'/'listchars' local to window
Using 'listchars' is a nice way to highlight tabs that were included by accident
for buffers that set 'expandtab'.

But maybe one does not want this for buffers that set 'noexpandtab', so now one
can use:

    autocmd FileType go let &l:listchars .= ',tab:  '
2019-01-26 14:45:47 +01:00
Björn Linse 1cec5542a8 multigrid: reorganize types and global varaibles 2018-12-31 16:24:07 +01:00
Utkarsh Maheshwari d5754eae02 multigrid: Add win_position event
Throttle win_position events
2018-12-31 12:44:22 +01:00
Utkarsh Maheshwari f102f50ebe multigrid: Change screen_* functions to grid_* functions 2018-12-31 12:44:21 +01:00
Justin M. Keyes 20620bae76 Merge #9306 'vim-patch: integrate xdiff library'
closes #1466
closes #1007
closes #1391
2018-12-09 23:07:28 +01:00
Anatolii Sakhnik 7b6c92eac1 vim-patch:8.1.0394: diffs are not always updated correctly
Problem:    Diffs are not always updated correctly.
Solution:   When using internal diff update for any changes properly.

e3521d9cbb
2018-12-09 19:45:56 +02:00
Anatolii Sakhnik cf1ffa9166 vim-patch:8.1.0360: using an external diff program is slow and inflexible
Problem:    Using an external diff program is slow and inflexible.
Solution:   Include the xdiff library. (Christian Brabandt)
            Use it by default.

e828b7621c

vim-patch:8.1.0360
vim-patch:8.1.0364
vim-patch:8.1.0366
vim-patch:8.1.0370
vim-patch:8.1.0377
vim-patch:8.1.0378
vim-patch:8.1.0381
vim-patch:8.1.0396
vim-patch:8.1.0432
2018-12-09 19:45:56 +02:00
Anatolii Sakhnik 67c5bc1ac0 Calm down the clinter 2018-12-09 08:07:59 +02:00
Justin M. Keyes ee94eecbd4 vim-patch:8.1.0448: cursorline not removed when using 'cursorbind'
Problem:    Cursorline not removed when using 'cursorbind'. (Justin Keyes)
Solution:   Store the last cursor line per window. (closes vim/vim#3488)
4a5abbd613
2018-10-16 00:15:09 +02:00
Jan Edmund Lazo d3f609db05 syntax: disptick_T is uint16_t 2018-07-29 18:03:16 -04:00
KunMing Xie 38fb835854 vim-patch:8.0.0548: saving the redo buffer only works one time (#8629)
Problem:    Saving the redo buffer only works one time, resulting in the "."
            command not working well for a function call inside another
            function call. (Ingo Karkat)
Solution:   Save the redo buffer at every user function call. (closes vim/vim#1619)
d4863aa99e
2018-06-24 22:16:57 +02:00
ZyX eaf2a25f12 *: Replace b_changedtick with new always-inline functions
Ref #8474
2018-06-22 00:44:31 +03:00
Jan Edmund Lazo bf61885cb4 vim-patch:8.0.0621: :stag does not respect 'switchbuf'
Problem:    The ":stag" command does not respect 'switchbuf'.
Solution:   Check 'switchbuf' for tag commands that may open a new window.
            (Ingo Karkat, closes vim/vim#1681)  Define macros for the return values
            of getfile().
8ad80dea08
2018-06-21 12:50:30 -04:00
KillTheMule 6bdcbef2f5 The grand renaming 2018-05-23 22:07:27 +02:00
Peter Hodge edcc73e766 API: Implement buffer updates
Originally written by @phodge in
https://github.com/neovim/neovim/pull/5269.
2018-05-23 22:07:27 +02:00
Shougo Matsushita 021c5875c1 vim-patch:8.0.1494: no autocmd triggered in Insert mode with visible popup menu
Problem:    No autocmd triggered in Insert mode with visible popup menu.
Solution:   Add TextChangedP. (Prabir Shrestha, Christian Brabandt,
            closes vim/vim#2372, closes vim/vim#1691)
            Fix that the TextChanged autocommands are not always triggered
            when sourcing a script.

5a09343719
2018-05-14 19:14:25 +08:00