mirror of
https://github.com/tbabej/taskwiki.git
synced 2025-08-19 06:43:06 +02:00
util: Add maxwidth and maxheight settings to splits that make them use whole window
This commit is contained in:
parent
b3b9705a4c
commit
ca895deea5
1 changed files with 11 additions and 1 deletions
|
@ -130,7 +130,17 @@ def show_in_split(lines, size=None, position="belowright", vertical=False,
|
|||
vim.command("AnsiEsc")
|
||||
|
||||
def tw_execute_colorful(tw, *args, **kwargs):
|
||||
override = kwargs.setdefault('config_override', {})
|
||||
maxwidth = kwargs.pop('maxwidth', False)
|
||||
maxheight = kwargs.pop('maxheight', False)
|
||||
|
||||
if ANSI_ESC_AVAILABLE:
|
||||
override = kwargs.setdefault('config_override', {})
|
||||
override['_forcecolor'] = "yes"
|
||||
|
||||
if maxheight:
|
||||
override['defaultheight'] = vim.current.window.height
|
||||
|
||||
if maxwidth:
|
||||
override['defaultwidth'] = vim.current.window.width
|
||||
|
||||
return tw.execute_command(*args, **kwargs)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue