]> git.lizzy.rs Git - micro.git/blobdiff - cmd/micro/command.go
Fix crash
[micro.git] / cmd / micro / command.go
index 1e41a7b25b636ad857391140800f479ccdb8f838..dac6ed58a7bbf7d03f1f63e7d82f2adfb60370e2 100644 (file)
@@ -162,7 +162,7 @@ func HandleCommand(input string, view *View) {
                                }
                                if choice {
                                        view.Cursor.DeleteSelection()
-                                       view.eh.Insert(match[0], replace)
+                                       view.Buf.Insert(match[0], replace)
                                        view.Cursor.ResetSelection()
                                        messenger.Reset()
                                } else {
@@ -174,7 +174,7 @@ func HandleCommand(input string, view *View) {
                                        continue
                                }
                        } else {
-                               view.eh.Replace(match[0], match[1], replace)
+                               view.Buf.Replace(match[0], match[1], replace)
                        }
                }
                if !found {