From 37f0a0cd8f9509cebdd82dde0a79bbc161c41095 Mon Sep 17 00:00:00 2001 From: midichef <67946319+midichef@users.noreply.github.com> Date: Sun, 1 Dec 2024 20:00:28 -0800 Subject: [PATCH] [errors-] fix error-recent always showing "no error" --- visidata/textsheet.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/visidata/textsheet.py b/visidata/textsheet.py index 28c869979..ae82ac32c 100644 --- a/visidata/textsheet.py +++ b/visidata/textsheet.py @@ -112,7 +112,7 @@ def recentErrorsSheet(self): -BaseSheet.addCommand('^E', 'error-recent', 'vd.lastErrors and vd.push(recentErrorsSheet) or status("no error")', 'view traceback for most recent error') +BaseSheet.addCommand('^E', 'error-recent', 'vd.push(recentErrorsSheet) if vd.lastErrors else status("no error")', 'view traceback for most recent error') BaseSheet.addCommand('g^E', 'errors-all', 'vd.push(vd.allErrorsSheet)', 'view traceback for most recent errors') Sheet.addCommand('z^E', 'error-cell', 'vd.push(ErrorCellSheet(sheet.name+"_cell_error", sourceSheet=sheet, source=getattr(cursorCell, "error", None) or fail("no error this cell")))', 'view traceback for error in current cell')