File tree Expand file tree Collapse file tree 1 file changed +8
-3
lines changed Expand file tree Collapse file tree 1 file changed +8
-3
lines changed Original file line number Diff line number Diff line change @@ -335,7 +335,10 @@ local prepare_node = function(item, state)
335335 end
336336 end
337337 end
338- state .longest_width_exact = math.max (state .longest_width_exact , vim .api .nvim_strwidth (line :content ()) + 1 )
338+ state .longest_width_exact = math.max (
339+ state .longest_width_exact ,
340+ vim .api .nvim_strwidth (line :content ()) + 1
341+ )
339342 end
340343
341344 return line
@@ -916,12 +919,14 @@ end
916919
917920--- Renders the given tree and expands window width if needed
918921-- @param state table The state containing tree to render. Almost same as state.tree:render()
919- render_tree = function (state )
922+ render_tree = function (state )
920923 state .tree :render ()
921924 if state .window .auto_expand_width and state .window .position ~= " float" then
922925 state .window .last_user_width = vim .api .nvim_win_get_width (0 )
923926 if state .longest_width_exact > state .window .last_user_width then
924- log .trace (string.format (" `auto_expand_width: on. Expanding width to %s." , state .longest_width_exact ))
927+ log .trace (
928+ string.format (" `auto_expand_width: on. Expanding width to %s." , state .longest_width_exact )
929+ )
925930 vim .api .nvim_win_set_width (0 , state .longest_width_exact )
926931 state .win_width = state .longest_width_exact
927932 render_tree (state )
You can’t perform that action at this time.
0 commit comments