Commit Graph

198 Commits

Author SHA1 Message Date
Justin M. Keyes
d41eb83019 Merge pull request #1236 from atwupack/vp-7.4.391
vim-patch:7.4.391
2014-09-26 15:57:50 -04:00
joshhartigan
5b54f3fd5e clang: Division by zero 2014-09-25 06:40:59 +01:00
Wayne Rowcliffe
7aca07b0a7 Remove W_NEXT use ->w_next 2014-09-24 19:00:50 -05:00
Wayne Rowcliffe
9b6f192693 Replace FOR_ALL_WINDOWS with FOR_ALL_WINDOWS_IN_TAB(curtab) 2014-09-24 19:00:50 -05:00
André Twupack
78d17e1f78 vim-patch:7.4.391
Problem:    No 'cursorline' highlighting when the cursor is on a line with
            diff highlighting. (Benjamin Fritz)
Solution:   Combine the highlight attributes. (Christian Brabandt)

https://code.google.com/p/vim/source/detail?r=v7-4-391
2014-09-24 21:08:57 +02:00
Marco Hinz
366f358a62 vim-patch:7.4.405
Problem:  Screen updating is slow when using matches.
Solution: Do not use the ">=" as in patch 7.4.362, check the lnum.

https://code.google.com/p/vim/source/detail?r=v7-4-405
2014-09-23 16:46:36 +02:00
Wayne Rowcliffe
683bc797a0 FOR_ALL_WINDOWS_IN_TAB and local variables in FOR_ALL_TAB_WINDOWS 2014-09-22 09:31:09 -05:00
Wayne Rowcliffe
b4ec6c1a4b FOR_ALL_TABS helper 2014-09-22 09:26:40 -05:00
Scott Prager
959ebfd5c2 7.4.371 2014-09-14 00:26:23 -04:00
André Twupack
12ca4f582e vim-patch:7.4.349
Problem:    When there are matches to highlight the whole window is redrawn,
            which is slow.
Solution:   Only redraw everything when lines were inserted or deleted.
            Reset b_mod_xlines when needed.  (Alexey Radkov)

https://code.google.com/p/vim/source/detail?r=v7-4-349
2014-09-11 20:46:10 +02:00
Wayne Rowcliffe
ac0b9714ed Additional FOR_ALL_WINDOWS usage 2014-09-08 17:27:41 -05:00
Wayne Rowcliffe
fe99930c46 Convert FOR_ALL_WINDOWS to use a locally declared pointer 2014-09-08 17:27:41 -05:00
Felipe Morales
9d7e3336cf vim-patch: 7.4.362
Problem:    When matchaddpos() uses a length smaller than the number of
bytes in the (last) character the highlight continues until the end of
            the line.
Solution:   Change condition from equal to larger-or-equal.

https://code.google.com/p/vim/source/detail?r=7fa2bed947fde3514a700c96861a537d816d6fd4
2014-09-04 00:18:25 -04:00
Felipe Morales
a8124602f0 vim-patch: 7.4.334
Problem:    Unitialized variables, causing some problems.
Solution:   Initialize the variables. (Dominique Pelle)

https://code.google.com/p/vim/source/detail?r=03d260a8ea0c0c67f424c387dbe2af5754e5e589
2014-09-04 00:18:24 -04:00
Felipe Morales
bf3d945798 vim-patch: 7.4.330
Problem:    Using a regexp pattern to highlight a specific position can
be slow.
Solution:   Add matchaddpos() to highlight specific positions
efficiently.
(Alexey Radkov.)

https://code.google.com/p/vim/source/detail?r=f9fa2e506b9f07549cd91074835c5c553db7b3a7
2014-09-04 00:18:24 -04:00
Felipe Morales
2e1c745869 vim-patch:7.4.388
Problem:    With 'linebreak' set and 'list' unset a Tab is not counted
            properly. (Kent Sibilev)
Solution:   Check the 'list' option. (Christian Brabandt)
2014-08-20 08:27:22 -04:00
Felipe Morales
244ea63724 vim-patch:7.4.371
Problem:    When 'linebreak' is set control characters are not correctly
displayed. (Kimmy Lindvall)
Solution:   Set n_extra. (Christian Brabandt)
2014-08-20 05:19:57 -04:00
Felipe Morales
dfdfee0260 vim-patch: 7.4.353
Make 'breakindent' work with the 'list' option.

Originally patched in vim patch 7.4.353, by chrisbra
(https://code.google.com/p/vim/source/detail?r=d42a1d3b74d40f580359dbd139d2d0dfa7235252)

Updated version.c.
2014-08-20 05:19:57 -04:00
Felipe Morales
47391b18e2 Port vim's patch 7.4.338 ('breakindent') 2014-08-20 05:19:49 -04:00
Damián Silvani
fc93536a90 vim-patch:7.4.314
Problem:    Completion messages can get in the way of a plugin.
Solution:   Add 'c' flag to 'shortmess' option. (Shougo Matsu)

https://code.google.com/p/vim/source/detail?r=4d7af1962d6ce61df65fdc5c86544a61951f9517
2014-08-14 23:20:08 -03:00
Florian Walch
1d524ea98d clang-analyzer: Reduce scope in screen.c. 2014-08-07 15:19:56 +02:00
Nicolas Hillegeer
db7cd61f62 profiling: implement on top of os_hrtime()
Should be better than gettimeofday() since libuv uses higher resolution
clocks on most UNIX platforms. Libuv also tries to use monotonic clocks,
kernel bugs notwithstanding, which is another win over gettimeofday().

Necessary for Windows, which doesn't have gettimeofday(). In vanilla vim,
Windows uses QueryPerformanceCounter, which is the correct primitive for
this sort of things, but that was removed when slimming up the codebase.
Libuv uses QueryPerformanceCounter to implement uv_hrtime() on Windows so
the behaviour of vim profiling on Windows should now be the same.

The behaviour on Linux should be different (better) though, libuv uses more
accurate primitives than gettimeofday().

Other misc. changes:
- Added function attributes where relevant (const, pure, ...)
- Convert functions to receive scalars: Now that proftime_T is always a
  (uint64_t) scalar (and not a struct), it's clearer to convert the
  functions to receive it as such instead of a pointer to a scalar.
- Extract profiling funcs to profile.c: make everything clearer and reduces
  the size of the "catch-all" ex_cmds2.c
- Add profile.{c,h} to clint and -Wconv:
  - Don't use sprintf, use snprintf
  - Don't use long, use int16_t/int32_t/...
2014-07-16 17:12:34 +02:00
Pavel Platto
47084ea765 Use strict function prototypes #945
`-Wstrict-prototypes` warn if a function is declared or defined without
specifying the argument types.

This warning disallow function prototypes with empty parameter list.
In C, a function declared with an empty parameter list accepts an
arbitrary number of arguments when being called. This is for historic
reasons; originally, C functions didn't have prototypes, as C evolved
from B, a typeless language. When prototypes were added, the original
typeless declarations were left in the language for backwards
compatibility.
Instead we should provide `void` in argument list to state
that function doesn't have arguments.

Also this warning disallow declaring type of the parameters after the
parentheses because Neovim header generator produce no declarations for
old-stlyle prototypes: it expects to find `{` after prototype.
2014-07-14 20:28:40 +02:00
Brandon Coleman
0fff487690 move errno.h include out of vim.h 2014-07-09 00:18:20 +02:00
Brandon Coleman
bf219e1442 move <inttypes.h> include out of vim.h 2014-07-09 00:18:19 +02:00
Brandon Coleman
82b71a3056 move ascii.h include out of vim.h 2014-07-09 00:18:18 +02:00
Brandon Coleman
a4f441e547 remove stdbool.h include from vim.h and globals.h 2014-07-09 00:18:17 +02:00
Klemen Košir
a568e8b644 Replaced most TRUE/FALSE macros in arabic, mbyte and spell. #645 2014-07-08 17:34:08 +00:00
Klemen Košir
ef34a0ab13 Replace int with bool in some files. #654 2014-07-08 17:25:48 +00:00
Justin M. Keyes
d723e7fd61 keep statusline within window width. @oni-link fix #858
PR #866
ref #858
2014-06-29 15:25:06 -04:00
oni-link
4ccf1125ff vim-patch:7.4.303 #818
Problem:    When using double-width characters the text displayed on the
            command line is sometimes truncated.
Solution:   Reset the string lenght. (Nobuhiro Takasaki)

https://code.google.com/p/vim/source/detail?r=463ef551e9f62b63ac3f85f1f297b668b14bcd09
2014-06-20 02:38:29 -04:00
oni-link
c388737957 vim-patch:7.4.302 #817
Problem:    Signs placed with 'foldcolumn' set don't show up after filler
            lines.
Solution:   Take filler lines into account. (Olaf Dabrunz)

https://code.google.com/p/vim/source/detail?r=df141c80ea3a1ffcbf82d05c1314675231fcfa75
2014-06-20 02:34:39 -04:00
Douglas Schneider
004b45d6f5 Replace vim_strncpy calls: screen.c 2014-06-13 18:08:21 -04:00
Pavel Platto
18b64c99cc Remove unnecessary (int) casts and fix style 2014-06-12 01:20:36 -05:00
Brandon Coleman
7f21665673 move/remove W_* macros
move W_ENDCOL to screen.c
remove the rest of the W_* macros
2014-06-12 01:20:36 -05:00
Nicolas Hillegeer
46e4bc0481 text: remove useless arg from mb_string2cells
mb_string2cells was always called like mb_string2cells(..., -1) so that was
the only codepath that was tested. @tarruda was the first to try to input an
actual length, after which valgrind detected that funny business was going
on.

It's not even possible to do the right thing with the current text codec
infrastructure: they all assume to be working with C strings. Meaning that
if there is no NUL-terminator, they will happily keep on reading past the
end of Pascal strings. Ergo, passing the length parameter is moot. The
condition in the for-loop was wrong as well (but that's no longer relevant).

Also change the return value to size_t, by analogy with strlen.

ref:
677d30d796
2014-06-08 12:48:22 -04:00
ZyX
70929f7e16 Add automatic generation of headers
- The 'stripdecls.py' script replaces declarations in all headers by includes to
  generated headers.
  `ag '#\s*if(?!ndef NEOVIM_).*((?!#\s*endif).*\n)*#ifdef INCLUDE_GENERATED'`
  was used for this.
- Add and integrate gendeclarations.lua into the build system to generate the
  required includes.
- Add -Wno-unused-function
- Made a bunch of old-style definitions ANSI

This adds a requirement: all type and structure definitions must be present
before INCLUDE_GENERATED_DECLARATIONS-protected include.

Warning: mch_expandpath (path.h.generated.h) was moved manually. So far it is
the only exception.
2014-06-02 11:04:17 -03:00
Hinidu
6f38fe39c4 Remove FEAT_DIFF
Support for vim's diff mode.
2014-05-28 13:08:54 -04:00
Hinidu
dd7657c160 Removed FEAT_WINDOWS
Support for multiple windows and status line.
2014-05-28 13:08:53 -04:00
Pavel Platto
baaa428785 Remove ml_ prefix from cursor.h functions
s/ml_get_curline/get_cursor_line_ptr
s/ml_get_cursor/get_cursor_pos_ptr
2014-05-28 10:42:06 -04:00
Hinidu
e62722922b Extract cursor.h from misc{1,2}.h and memline.h 2014-05-28 10:42:06 -04:00
Eliseo Martínez
95c3300ca6 Remove long_u: do_outofmem_msg().
Remove long_u occurrences due to do_outofmem_msg() function.
Refactor size parameter from long_u into size_t.
2014-05-24 01:17:42 +02:00
Felipe Oliveira Carvalho
e303a11ebf Remove OOM checks: suggested changes in review
- Replace a vim_strsave/free pair with xrealloc
 - Use xmallocz() in some places
 - Use xrealloc() and forget about the NULL pointer case
 - Remove invalid comment
 - Remove unnecessary checks
 - Replace a complicated xmalloc/STRCPY/free code chunk code with xrealloc()
 - Replace a vim_strsave/free code chunk with xrealloc()
2014-05-19 14:50:26 -03:00
Felipe Oliveira Carvalho
21784aeb00 Replace alloc() with xmalloc() and remove immediate OOM checks 2014-05-19 14:50:23 -03:00
Felipe Oliveira Carvalho
b4efff6523 Replace ga->ga_len > 0 checks with !GA_EMPTY(ga)
Used Coccinelle to perform the changes

```diff
@@
expression E;
@@

<...
(
- E.ga_len > 0
+ !GA_EMPTY(&E)
|
- E->ga_len > 0
+ !GA_EMPTY(E)
)
...>
```

`spatch --in-place --sp-file ga_empty.cocci <C_FILE>`
2014-05-17 07:02:44 -03:00
Eliseo Martínez
762a8ad0f3 Introduce nvim namespace: Fix unmasked strings.h issue.
Problem:  Now that nvim/strings.h is correctly namespaced, an issue
          that had been masked until now arises:

          When compiling, we get a lot of errors because of everywhere
          the functions in nvim/strings.h are used, there's no include
          to import them.

          But, how could this compile and work previously, then? It
          turns out that:
          - In every such case, we are also including vim.h, which in
            turn includes os_unix_defs.h.
          - os_unix_defs.h includes <string.h> and also <strings.h> in
            some systems (e.g. OSX).
          - Build had been modified previously to (even when importing
            system headers), prefer equally-named local ones. That was
            in fact done as a previous attempt to solve the same issue
            we are trying to solve another way now.

          So, we were including our "strings.h" as a side-effect of
          including <strings.h> through "vim.h" --> "os_unix_defs.h".

Solution: Correctly include "nvim/strings.h" in every file needing it.
2014-05-15 20:46:02 +02:00
Eliseo Martínez
409cc138f2 Introduce nvim namespace: Fix project-local includes.
Prepend 'nvim/' in all project-local (non-system) includes.
2014-05-15 20:46:01 +02:00
Eliseo Martínez
da51dc9cf2 Introduce nvim namespace: Move files.
Move files from src/ to src/nvim/.
- src/nvim/ becomes the new root dir for nvim executable sources.
- src/libnvim/ is planned to become root dir of the neovim library.
2014-05-15 20:46:01 +02:00