aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/window.c
diff options
context:
space:
mode:
authorJosh Rahm <rahm@google.com>2021-09-23 18:02:25 -0600
committerJosh Rahm <rahm@google.com>2021-10-05 02:20:00 -0600
commit264c6c463811f45c2a66e0ac948c49657c57b3ac (patch)
treea5ce8f15f9daaf6256014cbca148ce821a03bcbe /src/nvim/window.c
parentaba397991b59dbadad21b9ab7ad9f7a3a21f6259 (diff)
downloadrneovim-264c6c463811f45c2a66e0ac948c49657c57b3ac.tar.gz
rneovim-264c6c463811f45c2a66e0ac948c49657c57b3ac.tar.bz2
rneovim-264c6c463811f45c2a66e0ac948c49657c57b3ac.zip
Add the ability to title floating windows.
The window title is set using the {title} key on the FloatConfig. The window title allows for 3 different positions as defined by the {title_position} key in the FloatConfig: - left - center - right The title also supports StatusLine-style highlighting using the %#<HL># keys.
Diffstat (limited to 'src/nvim/window.c')
-rw-r--r--src/nvim/window.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/nvim/window.c b/src/nvim/window.c
index 400962f993..a0ddd580b2 100644
--- a/src/nvim/window.c
+++ b/src/nvim/window.c
@@ -2785,6 +2785,11 @@ static win_T *win_free_mem(win_T *win, int *dirp, tabpage_T *tp)
wp = firstwin;
}
}
+ xfree(win->w_float_config.title);
+ xfree(win->w_float_config.title_hl);
+ win->w_float_config.title_hl = NULL;
+ win->w_float_config.title = NULL;
+ win->w_float_config.n_title = 0;
win_free(win, tp);
// When deleting the current window of another tab page select a new