[vim/vim] Move mapping and abbreviations related functions to a separate source file (#4740)

29 views
Skip to first unread message

Yegappan Lakshmanan

unread,
Jul 28, 2019, 4:37:33 PM7/28/19
to vim/vim, Subscribed

You can view, comment on, or merge this pull request online at:

  https://github.com/vim/vim/pull/4740

Commit Summary

  • Move mapping and abbreviations related functions into a separate file

File Changes

Patch Links:


You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub

Codecov

unread,
Jul 28, 2019, 4:59:28 PM7/28/19
to vim/vim, Subscribed

Codecov Report

Merging #4740 into master will decrease coverage by 0.01%.
The diff coverage is 72.55%.

Impacted file tree graph

@@            Coverage Diff             @@

##           master    #4740      +/-   ##

==========================================

- Coverage   81.41%    81.4%   -0.02%     

==========================================

  Files         116      113       -3     

  Lines      145418   145157     -261     

==========================================

- Hits       118395   118158     -237     

+ Misses      27023    26999      -24
Impacted Files Coverage Δ
src/ex_docmd.c 81.17% <ø> (+0.06%) ⬆️
src/evalfunc.c 89.4% <ø> (-0.06%) ⬇️
src/getchar.c 81.84% <100%> (+4.65%) ⬆️
src/map.c 72.44% <72.44%> (ø)
src/viminfo.c 75.11% <0%> (-0.53%) ⬇️
src/memfile.c 78.03% <0%> (-0.21%) ⬇️
src/message.c 76.75% <0%> (-0.2%) ⬇️
src/mbyte.c 66.1% <0%> (-0.2%) ⬇️
src/term.c 79.12% <0%> (-0.06%) ⬇️
src/json_test.c
... and 9 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 13d5c3f...1057b30. Read the comment docs.


You are receiving this because you are subscribed to this thread.

Reply to this email directly, view it on GitHub, or mute the thread.

Bram Moolenaar

unread,
Jul 29, 2019, 3:04:32 PM7/29/19
to vim/vim, Subscribed

Yegappan wrote:

> * Move mapping and abbreviations related functions into a separate file

I'm not sure we should do this, getchar.c isn't that big.
I rather look into splitting things off the very big source files.

--
If your company is not involved in something called "ISO 9000" you probably
have no idea what it is. If your company _is_ involved in ISO 9000 then you
definitely have no idea what it is.
(Scott Adams - The Dilbert principle)

/// Bram Moolenaar -- Br...@Moolenaar.net -- http://www.Moolenaar.net \\\
/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\ an exciting new programming language -- http://www.Zimbu.org ///
\\\ help me help AIDS victims -- http://ICCF-Holland.org ///

Yegappan Lakshmanan

unread,
Jul 29, 2019, 11:49:35 PM7/29/19
to vim_dev, reply+ACY5DGB72AV6LAKAQZ...@reply.github.com, vim/vim, Subscribed
Hi Bram,

On Mon, Jul 29, 2019 at 12:04 PM Bram Moolenaar
<vim-dev...@256bit.org> wrote:
>
> Yegappan wrote:
>
> > * Move mapping and abbreviations related functions into a separate file
>
> I'm not sure we should do this, getchar.c isn't that big.
> I rather look into splitting things off the very big source files.
>

Before this change, the getchar.c file was 5389 lines long.
After this change, the file is 3179 lines long. The new map.c file
is 2332 lines long (including the code moved from ex_docmd.c).
The getchar.c file is in the top 25% based on the file size.

The map/abbr related code in getchar.c was already cleanly
separated from the rest of the code. So it was simple to move
that code into a new file.

Regards,
Yegappan

vim-dev ML

unread,
Jul 29, 2019, 11:49:56 PM7/29/19
to vim/vim, vim-dev ML, Your activity
Hi Bram,

On Mon, Jul 29, 2019 at 12:04 PM Bram Moolenaar
<vim-dev...@256bit.org> wrote:
>
> Yegappan wrote:
>
> > * Move mapping and abbreviations related functions into a separate file

>
> I'm not sure we should do this, getchar.c isn't that big.
> I rather look into splitting things off the very big source files.
>

Before this change, the getchar.c file was 5389 lines long.
After this change, the file is 3179 lines long. The new map.c file
is 2332 lines long (including the code moved from ex_docmd.c).
The getchar.c file is in the top 25% based on the file size.

The map/abbr related code in getchar.c was already cleanly
separated from the rest of the code. So it was simple to move
that code into a new file.

Regards,
Yegappan

Bram Moolenaar

unread,
Aug 1, 2019, 8:29:19 AM8/1/19
to vim/vim, vim-dev ML, Comment

Closed #4740 via b66bab3.


You are receiving this because you commented.

Reply all
Reply to author
Forward
0 new messages