From aa1408c01fad75576345d14bf4df30a0ee2989a9 Mon Sep 17 00:00:00 2001 From: Francesco Abbate Date: Fri, 5 Mar 2021 23:47:36 +0100 Subject: [PATCH] Do not assume doc.indent_info is present --- data/core/statusview.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/data/core/statusview.lua b/data/core/statusview.lua index 8d1a3653..58421c31 100644 --- a/data/core/statusview.lua +++ b/data/core/statusview.lua @@ -108,8 +108,8 @@ function StatusView:get_items() local line, col = dv.doc:get_selection() local dirty = dv.doc:is_dirty() local indent = dv.doc.indent_info - local indent_label = indent.type == "hard" and "tabs: " or "spaces: " - local indent_size = tostring(indent.size) .. (indent.confirmed and "" or "*") + local indent_label = (indent and indent.type == "hard") and "tabs: " or "spaces: " + local indent_size = indent and tostring(indent.size) .. (indent.confirmed and "" or "*") or "unknown" return { dirty and style.accent or style.text, style.icon_font, "f",