summary refs log tree commit diff stats
path: root/widgets
diff options
context:
space:
mode:
authorDrew DeVault <sir@cmpwn.com>2019-03-21 21:19:34 -0400
committerDrew DeVault <sir@cmpwn.com>2019-03-21 21:19:34 -0400
commitbe2918a6164989aba5b18b4f642501ddb8801c10 (patch)
tree6da3378babff1047b9a3a79e67f77fa7cae0f495 /widgets
parentd97cdde38dfaf8d7f63d5f86eb9eac4eab359dc4 (diff)
downloadaerc-be2918a6164989aba5b18b4f642501ddb8801c10.tar.gz
Use GetCursorPos instead of stored position
Diffstat (limited to 'widgets')
-rw-r--r--widgets/terminal.go5
1 files changed, 4 insertions, 1 deletions
diff --git a/widgets/terminal.go b/widgets/terminal.go
index 5b0be1a..7aaeda0 100644
--- a/widgets/terminal.go
+++ b/widgets/terminal.go
@@ -131,6 +131,7 @@ func NewTerminal(cmd *exec.Cmd) (*Terminal, error) {
 				return
 			}
 			screen.Flush()
+			term.flushTerminal()
 			term.Invalidate()
 		}
 	}()
@@ -290,7 +291,9 @@ func (term *Terminal) Draw(ctx *ui.Context) {
 	if !term.cursorShown {
 		ctx.HideCursor()
 	} else {
-		ctx.SetCursor(term.cursorPos.Col(), term.cursorPos.Row())
+		state := term.vterm.ObtainState()
+		row, col := state.GetCursorPos()
+		ctx.SetCursor(col, row)
 	}
 }
 
49' href='#n149'>149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229