Mercurial > vim
annotate src/proto/terminal.pro @ 20445:9f34aae7f69d v8.2.0777
patch 8.2.0777: terminal test fails
Commit: https://github.com/vim/vim/commit/79ea680e6b1dd02035fdf8a5521927cf1f98c2ed
Author: Bram Moolenaar <Bram@vim.org>
Date: Sun May 17 15:09:27 2020 +0200
patch 8.2.0777: terminal test fails
Problem: Terminal test fails.
Solution: Adjust character position for double-wide characters.
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Sun, 17 May 2020 15:15:04 +0200 |
parents | 2142fb624658 |
children | 4ed106deb772 |
rev | line source |
---|---|
11621
b8299e742f41
patch 8.0.0693: no terminal emulator support
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1 /* terminal.c */ |
13470
6faef782f50b
patch 8.0.1609: shell commands in the GUI use a dumb terminal
Christian Brabandt <cb@256bit.org>
parents:
13448
diff
changeset
|
2 void init_job_options(jobopt_T *opt); |
6faef782f50b
patch 8.0.1609: shell commands in the GUI use a dumb terminal
Christian Brabandt <cb@256bit.org>
parents:
13448
diff
changeset
|
3 buf_T *term_start(typval_T *argvar, char **argv, jobopt_T *opt, int flags); |
11621
b8299e742f41
patch 8.0.0693: no terminal emulator support
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
4 void ex_terminal(exarg_T *eap); |
13435
fa198b71bab2
patch 8.0.1592: terminal windows in a session are not properly restored
Christian Brabandt <cb@256bit.org>
parents:
13298
diff
changeset
|
5 int term_write_session(FILE *fd, win_T *wp); |
fa198b71bab2
patch 8.0.1592: terminal windows in a session are not properly restored
Christian Brabandt <cb@256bit.org>
parents:
13298
diff
changeset
|
6 int term_should_restore(buf_T *buf); |
11834
0cfe4a07c2ad
patch 8.0.0797: finished job in terminal window is not handled
Christian Brabandt <cb@256bit.org>
parents:
11804
diff
changeset
|
7 void free_terminal(buf_T *buf); |
15675
01890a3caefd
patch 8.1.0845: having job_status() free the job causes problems
Bram Moolenaar <Bram@vim.org>
parents:
15555
diff
changeset
|
8 void free_unused_terminals(void); |
11670
3b2afa2b77b3
patch 8.0.0718: output of job in terminal is not displayed
Christian Brabandt <cb@256bit.org>
parents:
11621
diff
changeset
|
9 void write_to_term(buf_T *buffer, char_u *msg, channel_T *channel); |
11917
00836eb177cb
patch 8.0.0838: buffer hangs around whem terminal window is closed
Christian Brabandt <cb@256bit.org>
parents:
11882
diff
changeset
|
10 int term_job_running(term_T *term); |
12393
128cd982c7b8
patch 8.0.1076: term_start() does not take callbacks
Christian Brabandt <cb@256bit.org>
parents:
12309
diff
changeset
|
11 int term_none_open(term_T *term); |
13438
33eea5ce5415
patch 8.0.1593: :qall never exits with an active terminal window
Christian Brabandt <cb@256bit.org>
parents:
13435
diff
changeset
|
12 int term_try_stop_job(buf_T *buf); |
13878
a590029f16a0
patch 8.0.1810: buffer of a terminal only updated in Terminal-Normal mode
Christian Brabandt <cb@256bit.org>
parents:
13851
diff
changeset
|
13 int term_check_timers(int next_due_arg, proftime_T *now); |
11993
92a86fe8adc0
patch 8.0.0877: using CTRL- CTRL-N in terminal is inconsistent
Christian Brabandt <cb@256bit.org>
parents:
11985
diff
changeset
|
14 int term_in_normal_mode(void); |
92a86fe8adc0
patch 8.0.0877: using CTRL- CTRL-N in terminal is inconsistent
Christian Brabandt <cb@256bit.org>
parents:
11985
diff
changeset
|
15 void term_enter_job_mode(void); |
18508
3cd689e9eb7f
patch 8.1.2248: CTRL-W dot does not work when modifyOtherKeys is enabled
Bram Moolenaar <Bram@vim.org>
parents:
18170
diff
changeset
|
16 int send_keys_to_term(term_T *term, int c, int modmask, int typed); |
12457
dfb8254aa735
patch 8.0.1108: cannot specify mappings for the terminal window
Christian Brabandt <cb@256bit.org>
parents:
12393
diff
changeset
|
17 int terminal_is_active(void); |
12082
504df4aa84c6
patch 8.0.0921: terminal window cursor shape not supported in the GUI
Christian Brabandt <cb@256bit.org>
parents:
12035
diff
changeset
|
18 cursorentry_T *term_get_cursor_shape(guicolor_T *fg, guicolor_T *bg); |
13851
3edac4cd1c0a
patch 8.0.1797: terminal window is redrawn too often
Christian Brabandt <cb@256bit.org>
parents:
13678
diff
changeset
|
19 int term_use_loop(void); |
13448
a62b0bbc8834
patch 8.0.1598: cannot select text in a terminal with the mouse
Christian Brabandt <cb@256bit.org>
parents:
13438
diff
changeset
|
20 void term_win_entered(void); |
12457
dfb8254aa735
patch 8.0.1108: cannot specify mappings for the terminal window
Christian Brabandt <cb@256bit.org>
parents:
12393
diff
changeset
|
21 int terminal_loop(int blocking); |
19275
2142fb624658
patch 8.2.0196: blocking commands for a finished job in a popup window
Bram Moolenaar <Bram@vim.org>
parents:
19265
diff
changeset
|
22 int may_close_term_popup(void); |
11834
0cfe4a07c2ad
patch 8.0.0797: finished job in terminal window is not handled
Christian Brabandt <cb@256bit.org>
parents:
11804
diff
changeset
|
23 void term_channel_closed(channel_T *ch); |
13888
81e8e6181aeb
patch 8.0.1815: crash with terminal window and with 'lazyredraw' set
Christian Brabandt <cb@256bit.org>
parents:
13878
diff
changeset
|
24 void term_check_channel_closed_recently(void); |
13851
3edac4cd1c0a
patch 8.0.1797: terminal window is redrawn too often
Christian Brabandt <cb@256bit.org>
parents:
13678
diff
changeset
|
25 int term_do_update_window(win_T *wp); |
3edac4cd1c0a
patch 8.0.1797: terminal window is redrawn too often
Christian Brabandt <cb@256bit.org>
parents:
13678
diff
changeset
|
26 void term_update_window(win_T *wp); |
11836
f080b225a2a4
patch 8.0.0798: no highlighting in a terminal window with a finished job
Christian Brabandt <cb@256bit.org>
parents:
11834
diff
changeset
|
27 int term_is_finished(buf_T *buf); |
11866
be40c8a9240d
patch 8.0.0813: cannot use a terminal window while the job is running
Christian Brabandt <cb@256bit.org>
parents:
11846
diff
changeset
|
28 int term_show_buffer(buf_T *buf); |
11836
f080b225a2a4
patch 8.0.0798: no highlighting in a terminal window with a finished job
Christian Brabandt <cb@256bit.org>
parents:
11834
diff
changeset
|
29 void term_change_in_curbuf(void); |
19265
ce8c47ed54e5
patch 8.2.0191: cannot put a terminal in a popup window
Bram Moolenaar <Bram@vim.org>
parents:
18508
diff
changeset
|
30 int term_get_attr(win_T *wp, linenr_T lnum, int col); |
ce8c47ed54e5
patch 8.2.0191: cannot put a terminal in a popup window
Bram Moolenaar <Bram@vim.org>
parents:
18508
diff
changeset
|
31 void term_update_colors(void); |
11772
f33b9375ba03
patch 8.0.0768: terminal window status shows "[Scratch]"
Christian Brabandt <cb@256bit.org>
parents:
11757
diff
changeset
|
32 char_u *term_get_status_text(term_T *term); |
11804
5630978ae089
patch 8.0.0784: job of terminal may be garbage collected
Christian Brabandt <cb@256bit.org>
parents:
11772
diff
changeset
|
33 int set_ref_in_term(int copyID); |
12973
418941f0df08
patch 8.0.1362: terminal window colors wrong when using Terminal highlighting
Christian Brabandt <cb@256bit.org>
parents:
12457
diff
changeset
|
34 void set_terminal_default_colors(int cterm_fg, int cterm_bg); |
13298
a88c5e12b860
patch 8.0.1523: cannot write and read terminal screendumps
Christian Brabandt <cb@256bit.org>
parents:
12973
diff
changeset
|
35 void f_term_dumpwrite(typval_T *argvars, typval_T *rettv); |
a88c5e12b860
patch 8.0.1523: cannot write and read terminal screendumps
Christian Brabandt <cb@256bit.org>
parents:
12973
diff
changeset
|
36 int term_swap_diff(void); |
a88c5e12b860
patch 8.0.1523: cannot write and read terminal screendumps
Christian Brabandt <cb@256bit.org>
parents:
12973
diff
changeset
|
37 void f_term_dumpdiff(typval_T *argvars, typval_T *rettv); |
a88c5e12b860
patch 8.0.1523: cannot write and read terminal screendumps
Christian Brabandt <cb@256bit.org>
parents:
12973
diff
changeset
|
38 void f_term_dumpload(typval_T *argvars, typval_T *rettv); |
12035
a3ed3d236839
patch 8.0.0898: can't use the alternate screen in a terminal window
Christian Brabandt <cb@256bit.org>
parents:
12025
diff
changeset
|
39 void f_term_getaltscreen(typval_T *argvars, typval_T *rettv); |
11846
1c65cad8b967
patch 8.0.0804: terminal window functions not yet implemented
Christian Brabandt <cb@256bit.org>
parents:
11836
diff
changeset
|
40 void f_term_getattr(typval_T *argvars, typval_T *rettv); |
11876
3704ca24c9a2
patch 8.0.0818: cannot get the cursor position of a terminal
Christian Brabandt <cb@256bit.org>
parents:
11866
diff
changeset
|
41 void f_term_getcursor(typval_T *argvars, typval_T *rettv); |
11846
1c65cad8b967
patch 8.0.0804: terminal window functions not yet implemented
Christian Brabandt <cb@256bit.org>
parents:
11836
diff
changeset
|
42 void f_term_getjob(typval_T *argvars, typval_T *rettv); |
1c65cad8b967
patch 8.0.0804: terminal window functions not yet implemented
Christian Brabandt <cb@256bit.org>
parents:
11836
diff
changeset
|
43 void f_term_getline(typval_T *argvars, typval_T *rettv); |
12025
c0ee48f48a2b
patch 8.0.0893: cannot get the scroll count of a terminal window
Christian Brabandt <cb@256bit.org>
parents:
11993
diff
changeset
|
44 void f_term_getscrolled(typval_T *argvars, typval_T *rettv); |
11846
1c65cad8b967
patch 8.0.0804: terminal window functions not yet implemented
Christian Brabandt <cb@256bit.org>
parents:
11836
diff
changeset
|
45 void f_term_getsize(typval_T *argvars, typval_T *rettv); |
13678
39fcaaa973db
patch 8.0.1711: term_setsize() is not implemented yet
Christian Brabandt <cb@256bit.org>
parents:
13626
diff
changeset
|
46 void f_term_setsize(typval_T *argvars, typval_T *rettv); |
11882
69e7379f46db
patch 8.0.0821: cannot get the title and status of a terminal window
Christian Brabandt <cb@256bit.org>
parents:
11876
diff
changeset
|
47 void f_term_getstatus(typval_T *argvars, typval_T *rettv); |
69e7379f46db
patch 8.0.0821: cannot get the title and status of a terminal window
Christian Brabandt <cb@256bit.org>
parents:
11876
diff
changeset
|
48 void f_term_gettitle(typval_T *argvars, typval_T *rettv); |
11933
d033653d3df8
patch 8.0.0846: cannot get the name of the pty of a job
Christian Brabandt <cb@256bit.org>
parents:
11917
diff
changeset
|
49 void f_term_gettty(typval_T *argvars, typval_T *rettv); |
11846
1c65cad8b967
patch 8.0.0804: terminal window functions not yet implemented
Christian Brabandt <cb@256bit.org>
parents:
11836
diff
changeset
|
50 void f_term_list(typval_T *argvars, typval_T *rettv); |
1c65cad8b967
patch 8.0.0804: terminal window functions not yet implemented
Christian Brabandt <cb@256bit.org>
parents:
11836
diff
changeset
|
51 void f_term_scrape(typval_T *argvars, typval_T *rettv); |
1c65cad8b967
patch 8.0.0804: terminal window functions not yet implemented
Christian Brabandt <cb@256bit.org>
parents:
11836
diff
changeset
|
52 void f_term_sendkeys(typval_T *argvars, typval_T *rettv); |
13678
39fcaaa973db
patch 8.0.1711: term_setsize() is not implemented yet
Christian Brabandt <cb@256bit.org>
parents:
13626
diff
changeset
|
53 void f_term_getansicolors(typval_T *argvars, typval_T *rettv); |
13626
ab89131d30e0
patch 8.0.1685: can't set ANSI colors of a terminal window
Christian Brabandt <cb@256bit.org>
parents:
13470
diff
changeset
|
54 void f_term_setansicolors(typval_T *argvars, typval_T *rettv); |
18170
4ac8161e92e0
patch 8.1.2080: the terminal API is limited and can't be disabled
Bram Moolenaar <Bram@vim.org>
parents:
18051
diff
changeset
|
55 void f_term_setapi(typval_T *argvars, typval_T *rettv); |
13438
33eea5ce5415
patch 8.0.1593: :qall never exits with an active terminal window
Christian Brabandt <cb@256bit.org>
parents:
13435
diff
changeset
|
56 void f_term_setrestore(typval_T *argvars, typval_T *rettv); |
33eea5ce5415
patch 8.0.1593: :qall never exits with an active terminal window
Christian Brabandt <cb@256bit.org>
parents:
13435
diff
changeset
|
57 void f_term_setkill(typval_T *argvars, typval_T *rettv); |
11866
be40c8a9240d
patch 8.0.0813: cannot use a terminal window while the job is running
Christian Brabandt <cb@256bit.org>
parents:
11846
diff
changeset
|
58 void f_term_start(typval_T *argvars, typval_T *rettv); |
11846
1c65cad8b967
patch 8.0.0804: terminal window functions not yet implemented
Christian Brabandt <cb@256bit.org>
parents:
11836
diff
changeset
|
59 void f_term_wait(typval_T *argvars, typval_T *rettv); |
12393
128cd982c7b8
patch 8.0.1076: term_start() does not take callbacks
Christian Brabandt <cb@256bit.org>
parents:
12309
diff
changeset
|
60 void term_send_eof(channel_T *ch); |
14139
4d3f6bf86bec
patch 8.1.0087: v:shell_error is always zero when using terminal for "!cmd"
Christian Brabandt <cb@256bit.org>
parents:
13888
diff
changeset
|
61 job_T *term_getjob(term_T *term); |
15725
a3e2e7948ee4
patch 8.1.0870: Vim doesn't use the new ConPTY support in Windows 10
Bram Moolenaar <Bram@vim.org>
parents:
15675
diff
changeset
|
62 int use_conpty(void); |
16354
b3bc3ba07bef
patch 8.1.1182: some function prototypes are outdated
Bram Moolenaar <Bram@vim.org>
parents:
15725
diff
changeset
|
63 int terminal_enabled(void); |
11621
b8299e742f41
patch 8.0.0693: no terminal emulator support
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
64 /* vim: set ft=c : */ |