Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@jakalope
Copy link

@jakalope jakalope commented Sep 9, 2017

This changeset adds terminal-job mode key mapping using commands tmap, tnoremap, tunmap, etc. Docs are updated and a test is added.

src/terminal.c Outdated
int c;

++no_mapping;
int prev_State = State;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[nit] prefer save_State

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.


func Test_terminal_tmap()
" TODO: Find an equivalent for win32
if !has('unix')
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'll do it after merge. Thanks

@brammool
Copy link
Contributor

brammool commented Sep 9, 2017 via email

@jakalope
Copy link
Author

jakalope commented Sep 9, 2017

@brammool Done!

@jakalope
Copy link
Author

jakalope commented Sep 10, 2017

Several of the build configurations are failing because (I think) the systems they're running on don't recognize the read system command:

From test_terminal.vim:
Found errors in Test_terminal_wipe_buffer():
function RunTheTest[24]..Test_terminal_wipe_buffer[4]..WaitFor[21]..<SNR>5_OutCB line 3: Expected process 15540 run but got channel 32 open
function RunTheTest[24]..Test_terminal_wipe_buffer[4]..WaitFor[21]..<SNR>5_OutCB line 4: Expected 'abcde' but got 'executing job failed: No such file or directory\r\n'

I'm open to suggestions on other ways to test this feature.

@mattn
Copy link
Member

mattn commented Sep 11, 2017

I'm not sure but can you try it with "bash -c 'read -n 4'" ?

@codecov-io
Copy link

codecov-io commented Sep 11, 2017

Codecov Report

Merging #2073 into master will decrease coverage by <.01%.
The diff coverage is 44.44%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #2073      +/-   ##
==========================================
- Coverage   73.76%   73.75%   -0.01%     
==========================================
  Files          90       90              
  Lines      130039   130044       +5     
  Branches    28922    28921       -1     
==========================================
- Hits        95928    95920       -8     
+ Misses      34111    34104       -7     
- Partials        0       20      +20
Impacted Files Coverage Δ
src/ex_docmd.c 74.87% <ø> (ø) ⬆️
src/normal.c 72.03% <ø> (ø) ⬆️
src/gui.c 45.64% <100%> (-0.06%) ⬇️
src/terminal.c 55.88% <25%> (-0.05%) ⬇️
src/getchar.c 73.86% <50%> (+0.29%) ⬆️
src/version.c 79.18% <0%> (-1.02%) ⬇️
src/libvterm/src/screen.c 71.45% <0%> (-0.53%) ⬇️
src/gui_gtk_x11.c 47.32% <0%> (-0.06%) ⬇️
src/window.c 80.96% <0%> (-0.04%) ⬇️
... and 4 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 45d5f26...9540428. Read the comment docs.

@jakalope
Copy link
Author

@mattn That seems to have worked, thanks!

@jakalope
Copy link
Author

@brammool I don't see any clear way to add tests that would (a) make sense in the context of this PR and (b) improve the test coverage. Please advise.

@brammool brammool closed this in 69fbc9e Sep 14, 2017
adizero pushed a commit to adizero/vim that referenced this pull request May 19, 2018
Problem:    Cannot specify mappings for the terminal window.
Solution:   Add the :tmap command and associated code.  (Jacob Askeland,
            closes vim#2073)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants