Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
V
Vim
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Wiki
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Someone-Else
Vim
Commits
c1b52863
Commit
c1b52863
authored
18 years ago
by
Bram Moolenaar
Browse files
Options
Downloads
Patches
Plain Diff
updated for version 7.0f04
parent
437df8f4
Loading
Loading
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/getchar.c
+7
-1
7 additions, 1 deletion
src/getchar.c
src/window.c
+25
-15
25 additions, 15 deletions
src/window.c
with
32 additions
and
16 deletions
src/getchar.c
+
7
−
1
View file @
c1b52863
...
@@ -2321,7 +2321,8 @@ vgetorpeek(advance)
...
@@ -2321,7 +2321,8 @@ vgetorpeek(advance)
/*
/*
* Handle ":map <expr>": evaluate the {rhs} as an
* Handle ":map <expr>": evaluate the {rhs} as an
* expression. Save and restore the typeahead so that
* expression. Save and restore the typeahead so that
* getchar() can be used.
* getchar() can be used. Also save and restore the
* command line for "normal :".
*/
*/
if
(
mp
->
m_expr
)
if
(
mp
->
m_expr
)
{
{
...
@@ -4301,8 +4302,13 @@ eval_map_expr(str)
...
@@ -4301,8 +4302,13 @@ eval_map_expr(str)
{
{
char_u
*
res
;
char_u
*
res
;
char_u
*
p
;
char_u
*
p
;
char_u
*
save_cmd
;
save_cmd
=
save_cmdline_alloc
();
if
(
save_cmd
==
NULL
)
return
NULL
;
p
=
eval_to_string
(
str
,
NULL
,
FALSE
);
p
=
eval_to_string
(
str
,
NULL
,
FALSE
);
restore_cmdline_alloc
(
save_cmd
);
if
(
p
==
NULL
)
if
(
p
==
NULL
)
return
NULL
;
return
NULL
;
res
=
vim_strsave_escape_csi
(
p
);
res
=
vim_strsave_escape_csi
(
p
);
...
...
This diff is collapsed.
Click to expand it.
src/window.c
+
25
−
15
View file @
c1b52863
...
@@ -2003,6 +2003,7 @@ win_close(win, free_buf)
...
@@ -2003,6 +2003,7 @@ win_close(win, free_buf)
int
close_curwin
=
FALSE
;
int
close_curwin
=
FALSE
;
int
dir
;
int
dir
;
int
help_window
=
FALSE
;
int
help_window
=
FALSE
;
tabpage_T
*
prev_curtab
=
curtab
;
if
(
last_window
())
if
(
last_window
())
{
{
...
@@ -2051,44 +2052,53 @@ win_close(win, free_buf)
...
@@ -2051,44 +2052,53 @@ win_close(win, free_buf)
* Close the link to the buffer.
* Close the link to the buffer.
*/
*/
close_buffer
(
win
,
win
->
w_buffer
,
free_buf
?
DOBUF_UNLOAD
:
0
);
close_buffer
(
win
,
win
->
w_buffer
,
free_buf
?
DOBUF_UNLOAD
:
0
);
/* Autocommands may have closed the window already, or closed the only
/* Autocommands may have closed the window already, or closed the only
* other window. */
* other window
or moved to another tab page
. */
if
(
!
win_valid
(
win
)
||
last_window
())
if
(
!
win_valid
(
win
)
||
last_window
()
||
curtab
!=
prev_curtab
)
return
;
return
;
/* Free the memory used for the window. */
/* When closing the last window in a tab page go to another tab page. This
wp
=
win_free_mem
(
win
,
&
dir
,
NULL
);
* must be done before freeing memory to avoid that "topframe" becomes
* invalid (it may be used in GUI events). */
/* When closing the last window in a tab page go to another tab page. */
if
(
firstwin
==
lastwin
)
if
(
wp
==
NULL
)
{
{
tabpage_T
*
ptp
=
NULL
;
tabpage_T
*
ptp
=
NULL
;
tabpage_T
*
tp
;
tabpage_T
*
tp
;
tabpage_T
*
atp
=
alt_tabpage
();
tabpage_T
*
atp
=
alt_tabpage
();
for
(
tp
=
first_tabpage
;
tp
!=
curtab
;
tp
=
tp
->
tp_next
)
/* We don't do the window resizing stuff, let enter_tabpage() take
* care of entering a window in another tab page. */
enter_tabpage
(
atp
,
old_curbuf
);
for
(
tp
=
first_tabpage
;
tp
!=
NULL
&&
tp
!=
prev_curtab
;
tp
=
tp
->
tp_next
)
ptp
=
tp
;
ptp
=
tp
;
if
(
tp
==
NULL
)
if
(
tp
!=
prev_curtab
||
tp
->
tp_firstwin
!=
win
)
{
{
EMSG2
(
_
(
e_intern2
),
"win_close()"
);
/* Autocommands must have closed it when jumping to the other tab
* page. */
return
;
return
;
}
}
(
void
)
win_free_mem
(
win
,
&
dir
,
tp
);
if
(
ptp
==
NULL
)
if
(
ptp
==
NULL
)
first_tabpage
=
tp
->
tp_next
;
first_tabpage
=
tp
->
tp_next
;
else
else
ptp
->
tp_next
=
tp
->
tp_next
;
ptp
->
tp_next
=
tp
->
tp_next
;
free_tabpage
(
tp
);
free_tabpage
(
tp
);
/* We don't do the window resizing stuff, let enter_tabpage() take
* care of entering a window in another tab page. */
enter_tabpage
(
atp
,
old_curbuf
);
return
;
return
;
}
}
/* Free the memory used for the window. */
wp
=
win_free_mem
(
win
,
&
dir
,
NULL
);
/* Make sure curwin isn't invalid. It can cause severe trouble when
/* Make sure curwin isn't invalid. It can cause severe trouble when
* printing an error message. For win_equal() curbuf needs to be valid
* printing an error message. For win_equal() curbuf needs to be valid
* too. */
* too. */
else
if
(
win
==
curwin
)
if
(
win
==
curwin
)
{
{
curwin
=
wp
;
curwin
=
wp
;
#ifdef FEAT_QUICKFIX
#ifdef FEAT_QUICKFIX
...
@@ -2213,7 +2223,7 @@ win_close_othertab(win, free_buf, tp)
...
@@ -2213,7 +2223,7 @@ win_close_othertab(win, free_buf, tp)
}
}
ptp
->
tp_next
=
tp
->
tp_next
;
ptp
->
tp_next
=
tp
->
tp_next
;
}
}
vim_fre
e
(
tp
);
free_tabpag
e
(
tp
);
}
}
}
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment