diff options
author | pommicket <pommicket@gmail.com> | 2024-02-13 09:58:16 -0500 |
---|---|---|
committer | pommicket <pommicket@gmail.com> | 2024-02-13 09:58:16 -0500 |
commit | 176f0b1f52676bbcf61e5098e5cec400d52fc306 (patch) | |
tree | 7ab4e0bd76745ed2d84050d414637e1b72d41cb5 /node.c | |
parent | 6d85a7e605011d16018fdf202e40e59e2f916b63 (diff) |
auto-detect indentation
Diffstat (limited to 'node.c')
-rw-r--r-- | node.c | 7 |
1 files changed, 5 insertions, 2 deletions
@@ -418,8 +418,11 @@ void node_frame(Ted *ted, Node *node, Rect r) { // highlight active tab gl_geometry_rect(tab_rect, settings_color(settings, is_active ? COLOR_ACTIVE_TAB_HL : COLOR_SELECTED_TAB_HL)); // set window title to active tab's title - strbuf_printf(ted->window_title, "ted %s | %s", tab_title, - settings->indent_with_spaces ? "spaces" : "tabs"); + strbuf_printf(ted->window_title, "ted %s | ", tab_title); + if (buffer_indent_with_spaces(buffer)) + strbuf_catf(ted->window_title, "%u spaces", buffer_tab_width(buffer)); + else + strbuf_catf(ted->window_title, "tabs"); if (*rc_str(settings->lsp, "")) { LSP *lsp = buffer_lsp(buffer); strbuf_catf(ted->window_title, " | LSP %s", |