diff options
author | Jesse Duffield <jessedduffield@gmail.com> | 2021-10-17 19:01:02 +1100 |
---|---|---|
committer | Jesse Duffield <jessedduffield@gmail.com> | 2021-10-17 19:45:57 +1100 |
commit | d672b7342f12c64112cd6b59fb5e4286a7cb92b4 (patch) | |
tree | 4b4c51680b05217708ce7ca596b6a47ffc170838 /pkg/gui/main_panels.go | |
parent | e7c27b6f4aef44a2391dd207e1321008b5d1dcff (diff) |
stop resetting scroll all the time
Diffstat (limited to 'pkg/gui/main_panels.go')
-rw-r--r-- | pkg/gui/main_panels.go | 18 |
1 files changed, 0 insertions, 18 deletions
diff --git a/pkg/gui/main_panels.go b/pkg/gui/main_panels.go index 389a9d783..72af94b1d 100644 --- a/pkg/gui/main_panels.go +++ b/pkg/gui/main_panels.go @@ -29,7 +29,6 @@ type TaskKind int const ( RENDER_STRING TaskKind = iota RENDER_STRING_WITHOUT_SCROLL - RUN_FUNCTION RUN_COMMAND RUN_PTY ) @@ -97,19 +96,6 @@ func NewRunPtyTask(cmd *exec.Cmd) *runPtyTask { // return &runPtyTask{cmd: cmd, prefix: prefix} // } -type runFunctionTask struct { - f func(chan struct{}) error -} - -func (t *runFunctionTask) GetKind() TaskKind { - return RUN_FUNCTION -} - -// currently unused -// func (gui *Gui) createRunFunctionTask(f func(chan struct{}) error) *runFunctionTask { -// return &runFunctionTask{f: f} -// } - func (gui *Gui) runTaskForView(view *gocui.View, task updateTask) error { switch task.GetKind() { case RENDER_STRING: @@ -120,10 +106,6 @@ func (gui *Gui) runTaskForView(view *gocui.View, task updateTask) error { specificTask := task.(*renderStringWithoutScrollTask) return gui.newStringTaskWithoutScroll(view, specificTask.str) - case RUN_FUNCTION: - specificTask := task.(*runFunctionTask) - return gui.newTask(view, specificTask.f) - case RUN_COMMAND: specificTask := task.(*runCommandTask) return gui.newCmdTask(view, specificTask.cmd, specificTask.prefix) |