From 09d14c2b70e75201ae7c3f4d1b2fc8a2b94c7e08 Mon Sep 17 00:00:00 2001 From: joce Date: Wed, 3 Feb 2021 12:56:14 -0500 Subject: [PATCH] Fix refresh issue when removing ticker The last line of the list of tickers was not cleared when removing a ticker symbol. This has now been fixed. --- line_editor.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/line_editor.go b/line_editor.go index 35e803d..b83439a 100644 --- a/line_editor.go +++ b/line_editor.go @@ -5,10 +5,10 @@ package mop import ( - `regexp` - `strings` + "regexp" + "strings" - `github.com/nsf/termbox-go` + "github.com/nsf/termbox-go" ) // LineEditor kicks in when user presses '+' or '-' to add or delete stock @@ -189,7 +189,7 @@ func (editor *LineEditor) execute() *LineEditor { // Clear the lines at the bottom of the list, if any. after := before - removed - for i := before; i > after; i-- { + for i := before + 1; i > after; i-- { editor.screen.ClearLine(0, i+4) } }