From 9a294b5fe6a280c7b94cd871195a7f92c3e8ce50 Mon Sep 17 00:00:00 2001 From: Graham Clark Date: Sat, 4 Jun 2022 15:40:20 -0400 Subject: [PATCH 1/7] Ignore new go workspace definition for local use --- .gitignore | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 .gitignore diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..a6162d1 --- /dev/null +++ b/.gitignore @@ -0,0 +1,3 @@ +*.log +/go.work +/go.work.sum From fb3ba8207c199f595b7b2e04e55e4ade73830bb4 Mon Sep 17 00:00:00 2001 From: Graham Clark Date: Sat, 4 Jun 2022 16:01:19 -0400 Subject: [PATCH 2/7] Update copyrights --- app.go | 2 +- callbacks.go | 2 +- callbacks_test.go | 2 +- canvas.go | 2 +- canvas_test.go | 2 +- cell.go | 2 +- decoration.go | 2 +- decoration_test.go | 2 +- examples/gowid-asciigraph/asciigraph.go | 2 +- examples/gowid-dir/dir.go | 2 +- examples/gowid-editor/editor.go | 2 +- examples/gowid-fib/fib.go | 2 +- examples/gowid-graph/graph.go | 2 +- examples/gowid-helloworld/helloworld.go | 2 +- examples/gowid-menu/menu.go | 2 +- examples/gowid-overlay1/overlay1.go | 2 +- examples/gowid-overlay2/overlay2.go | 2 +- examples/gowid-overlay3/overlay3.go | 2 +- examples/gowid-palette/palette.go | 2 +- examples/gowid-table/table.go | 2 +- examples/gowid-terminal/terminal.go | 2 +- examples/gowid-tree/tree.go | 2 +- examples/gowid-tutorial1/tutorial1.go | 2 +- examples/gowid-tutorial2/tutorial2.go | 2 +- examples/gowid-tutorial3/tutorial3.go | 2 +- examples/gowid-tutorial4/tutorial4.go | 2 +- examples/gowid-tutorial5/tutorial5.go | 2 +- examples/gowid-tutorial6/tutorial6.go | 2 +- examples/gowid-widgets1/widgets1.go | 2 +- examples/gowid-widgets2/widgets2.go | 2 +- examples/gowid-widgets3/widgets3.go | 2 +- examples/gowid-widgets4/widgets4.go | 2 +- examples/gowid-widgets5/widgets5.go | 2 +- examples/gowid-widgets6/widgets6.go | 2 +- examples/gowid-widgets7/widgets7.go | 2 +- examples/gowid-widgets8/widgets8.go | 2 +- examples/utils.go | 2 +- gwtest/support_test.go | 2 +- gwtest/testutils.go | 2 +- gwutil/utils.go | 2 +- gwutil/utils_test.go | 2 +- support.go | 2 +- utils.go | 2 +- vim/vim_test.go | 2 +- widgets/asciigraph/asciigraph.go | 2 +- widgets/asciigraph/asciigraph_test.go | 2 +- widgets/bargraph/bargraph.go | 2 +- widgets/boxadapter/boxadapter.go | 2 +- widgets/boxadapter/boxadapter_test.go | 2 +- widgets/button/button.go | 2 +- widgets/button/button_test.go | 2 +- widgets/cellmod/cellmod.go | 2 +- widgets/checkbox/checkbox.go | 2 +- widgets/checkbox/checkbox_test.go | 2 +- widgets/clicktracker/clicktracker.go | 2 +- widgets/columns/columns.go | 2 +- widgets/columns/columns_test.go | 2 +- widgets/dialog/dialog.go | 2 +- widgets/disable/disable.go | 2 +- widgets/divider/divider.go | 2 +- widgets/divider/divider_test.go | 2 +- widgets/edit/edit.go | 2 +- widgets/edit/edit_test.go | 2 +- widgets/fill/fill.go | 2 +- widgets/fill/fill_test.go | 2 +- widgets/fixedadapter/fixedadapter.go | 2 +- widgets/fixedadapter/fixedadapter_test.go | 2 +- widgets/framed/framed.go | 2 +- widgets/framed/framed_test.go | 2 +- widgets/grid/grid.go | 2 +- widgets/grid/grid_test.go | 2 +- widgets/holder/holder.go | 2 +- widgets/hpadding/hpadding.go | 2 +- widgets/hpadding/hpadding_test.go | 2 +- widgets/isselected/isselected.go | 2 +- widgets/keypress/keypress.go | 2 +- widgets/keypress/keypress_test.go | 2 +- widgets/list/list.go | 2 +- widgets/list/list_test.go | 2 +- widgets/menu/menu.go | 2 +- widgets/null/null.go | 2 +- widgets/overlay/overlay.go | 2 +- widgets/padding/padding.go | 2 +- widgets/padding/padding_test.go | 2 +- widgets/palettemap/palettemap.go | 2 +- widgets/pile/pile.go | 2 +- widgets/pile/pile_test.go | 2 +- widgets/progress/progress.go | 2 +- widgets/progress/progress_test.go | 2 +- widgets/radio/radio.go | 2 +- widgets/radio/radio_test.go | 2 +- widgets/selectable/selectable.go | 2 +- widgets/shadow/shadow.go | 2 +- widgets/spinner/spinner.go | 2 +- widgets/styled/styled.go | 2 +- widgets/styled/styled_test.go | 2 +- widgets/table/simple_model.go | 2 +- widgets/table/table.go | 2 +- widgets/table/table_test.go | 2 +- widgets/terminal/term_canvas.go | 2 +- widgets/terminal/terminal.go | 2 +- widgets/terminal/terminal_test.go | 2 +- widgets/terminal/utils.go | 2 +- widgets/text/testwidget.go | 2 +- widgets/text/text.go | 2 +- widgets/text/text_test.go | 2 +- widgets/tree/tree.go | 2 +- widgets/tree/tree_test.go | 2 +- widgets/vpadding/vpadding.go | 2 +- widgets/vpadding/vpadding_test.go | 2 +- widgets/vscroll/vscroll.go | 2 +- widgets/vscroll/vscroll_test.go | 2 +- 112 files changed, 112 insertions(+), 112 deletions(-) diff --git a/app.go b/app.go index 2bc3c18..f43b329 100644 --- a/app.go +++ b/app.go @@ -1,4 +1,4 @@ -// Copyright 2019 Graham Clark. All rights reserved. Use of this source +// Copyright 2019-2022 Graham Clark. All rights reserved. Use of this source // code is governed by the MIT license that can be found in the LICENSE // file. diff --git a/callbacks.go b/callbacks.go index f26da6b..c5489d1 100644 --- a/callbacks.go +++ b/callbacks.go @@ -1,4 +1,4 @@ -// Copyright 2019 Graham Clark. All rights reserved. Use of this source code is governed by the MIT license +// Copyright 2019-2022 Graham Clark. All rights reserved. Use of this source code is governed by the MIT license // that can be found in the LICENSE file. package gowid diff --git a/callbacks_test.go b/callbacks_test.go index c523583..39f07b9 100644 --- a/callbacks_test.go +++ b/callbacks_test.go @@ -1,4 +1,4 @@ -// Copyright 2019 Graham Clark. All rights reserved. Use of this source code is governed by the MIT license +// Copyright 2019-2022 Graham Clark. All rights reserved. Use of this source code is governed by the MIT license // that can be found in the LICENSE file. package gowid diff --git a/canvas.go b/canvas.go index a4de492..df3ba4b 100644 --- a/canvas.go +++ b/canvas.go @@ -1,4 +1,4 @@ -// Copyright 2019 Graham Clark. All rights reserved. Use of this source +// Copyright 2019-2022 Graham Clark. All rights reserved. Use of this source // code is governed by the MIT license that can be found in the LICENSE // file. diff --git a/canvas_test.go b/canvas_test.go index 5b763bd..d8ae6d4 100644 --- a/canvas_test.go +++ b/canvas_test.go @@ -1,4 +1,4 @@ -// Copyright 2019 Graham Clark. All rights reserved. Use of this source +// Copyright 2019-2022 Graham Clark. All rights reserved. Use of this source // code is governed by the MIT license that can be found in the LICENSE // file. diff --git a/cell.go b/cell.go index 2d09c68..471e3e4 100644 --- a/cell.go +++ b/cell.go @@ -1,4 +1,4 @@ -// Copyright 2019 Graham Clark. All rights reserved. Use of this source +// Copyright 2019-2022 Graham Clark. All rights reserved. Use of this source // code is governed by the MIT license that can be found in the LICENSE // file. diff --git a/decoration.go b/decoration.go index ab4978e..43bbd69 100644 --- a/decoration.go +++ b/decoration.go @@ -1,4 +1,4 @@ -// Copyright 2019 Graham Clark. All rights reserved. Use of this source code is governed by the MIT license +// Copyright 2019-2022 Graham Clark. All rights reserved. Use of this source code is governed by the MIT license // that can be found in the LICENSE file. package gowid diff --git a/decoration_test.go b/decoration_test.go index 5ae9bd4..7321fad 100644 --- a/decoration_test.go +++ b/decoration_test.go @@ -1,4 +1,4 @@ -// Copyright 2019 Graham Clark. All rights reserved. Use of this source code is governed by the MIT license +// Copyright 2019-2022 Graham Clark. All rights reserved. Use of this source code is governed by the MIT license // that can be found in the LICENSE file. package gowid diff --git a/examples/gowid-asciigraph/asciigraph.go b/examples/gowid-asciigraph/asciigraph.go index be5cbfd..1ec02fd 100644 --- a/examples/gowid-asciigraph/asciigraph.go +++ b/examples/gowid-asciigraph/asciigraph.go @@ -1,4 +1,4 @@ -// Copyright 2019 Graham Clark. All rights reserved. Use of this source code is governed by the MIT license +// Copyright 2019-2022 Graham Clark. All rights reserved. Use of this source code is governed by the MIT license // that can be found in the LICENSE file. // An example of the gowid asciigraph widget which relies upon the diff --git a/examples/gowid-dir/dir.go b/examples/gowid-dir/dir.go index 5899b76..1dfedaf 100644 --- a/examples/gowid-dir/dir.go +++ b/examples/gowid-dir/dir.go @@ -1,4 +1,4 @@ -// Copyright 2019 Graham Clark. All rights reserved. Use of this source code is governed by the MIT license +// Copyright 2019-2022 Graham Clark. All rights reserved. Use of this source code is governed by the MIT license // that can be found in the LICENSE file. // A simple gowid directory browser. diff --git a/examples/gowid-editor/editor.go b/examples/gowid-editor/editor.go index d5714d5..2eecfe9 100644 --- a/examples/gowid-editor/editor.go +++ b/examples/gowid-editor/editor.go @@ -1,4 +1,4 @@ -// Copyright 2019 Graham Clark. All rights reserved. Use of this source code is governed by the MIT license +// Copyright 2019-2022 Graham Clark. All rights reserved. Use of this source code is governed by the MIT license // that can be found in the LICENSE file. // A poor-man's editor using gowid widgets - shows dialog, edit and vscroll. diff --git a/examples/gowid-fib/fib.go b/examples/gowid-fib/fib.go index 8ce4493..ef5527c 100644 --- a/examples/gowid-fib/fib.go +++ b/examples/gowid-fib/fib.go @@ -1,4 +1,4 @@ -// Copyright 2019 Graham Clark. All rights reserved. Use of this source code is governed by the MIT license +// Copyright 2019-2022 Graham Clark. All rights reserved. Use of this source code is governed by the MIT license // that can be found in the LICENSE file. // A port of urwid's fib.py example using gowid widgets. diff --git a/examples/gowid-graph/graph.go b/examples/gowid-graph/graph.go index a1da3b5..31742e2 100644 --- a/examples/gowid-graph/graph.go +++ b/examples/gowid-graph/graph.go @@ -1,4 +1,4 @@ -// Copyright 2019 Graham Clark. All rights reserved. Use of this source code is governed by the MIT license +// Copyright 2019-2022 Graham Clark. All rights reserved. Use of this source code is governed by the MIT license // that can be found in the LICENSE file. // A port of urwid's graph.py example using gowid widgets. diff --git a/examples/gowid-helloworld/helloworld.go b/examples/gowid-helloworld/helloworld.go index 18c1762..ca3c0a3 100644 --- a/examples/gowid-helloworld/helloworld.go +++ b/examples/gowid-helloworld/helloworld.go @@ -1,4 +1,4 @@ -// Copyright 2019 Graham Clark. All rights reserved. Use of this source code is governed by the MIT license +// Copyright 2019-2022 Graham Clark. All rights reserved. Use of this source code is governed by the MIT license // that can be found in the LICENSE file. // A port of urwid's "Hello World" example from the tutorial, using gowid widgets. diff --git a/examples/gowid-menu/menu.go b/examples/gowid-menu/menu.go index deeeeb8..c18782b 100644 --- a/examples/gowid-menu/menu.go +++ b/examples/gowid-menu/menu.go @@ -1,4 +1,4 @@ -// Copyright 2019 Graham Clark. All rights reserved. Use of this source code is governed by the MIT license +// Copyright 2019-2022 Graham Clark. All rights reserved. Use of this source code is governed by the MIT license // that can be found in the LICENSE file. // A demonstration of gowid's menu, list and overlay widgets. diff --git a/examples/gowid-overlay1/overlay1.go b/examples/gowid-overlay1/overlay1.go index e6c0df3..fbbb4b1 100644 --- a/examples/gowid-overlay1/overlay1.go +++ b/examples/gowid-overlay1/overlay1.go @@ -1,4 +1,4 @@ -// Copyright 2019 Graham Clark. All rights reserved. Use of this source code is governed by the MIT license +// Copyright 2019-2022 Graham Clark. All rights reserved. Use of this source code is governed by the MIT license // that can be found in the LICENSE file. // A demonstration of gowid's overlay and fill widgets. diff --git a/examples/gowid-overlay2/overlay2.go b/examples/gowid-overlay2/overlay2.go index dc3ec00..3cd4347 100644 --- a/examples/gowid-overlay2/overlay2.go +++ b/examples/gowid-overlay2/overlay2.go @@ -1,4 +1,4 @@ -// Copyright 2019 Graham Clark. All rights reserved. Use of this source code is governed by the MIT license +// Copyright 2019-2022 Graham Clark. All rights reserved. Use of this source code is governed by the MIT license // that can be found in the LICENSE file. // A demonstration of gowid's overlay, fill, asciigraph and radio widgets. diff --git a/examples/gowid-overlay3/overlay3.go b/examples/gowid-overlay3/overlay3.go index 3772ae9..2d12176 100644 --- a/examples/gowid-overlay3/overlay3.go +++ b/examples/gowid-overlay3/overlay3.go @@ -1,4 +1,4 @@ -// Copyright 2019 Graham Clark. All rights reserved. Use of this source code is governed by the MIT license +// Copyright 2019-2022 Graham Clark. All rights reserved. Use of this source code is governed by the MIT license // that can be found in the LICENSE file. // A demonstration of gowid's overlay and fill widgets. diff --git a/examples/gowid-palette/palette.go b/examples/gowid-palette/palette.go index b4ff261..ff7c3e0 100644 --- a/examples/gowid-palette/palette.go +++ b/examples/gowid-palette/palette.go @@ -1,4 +1,4 @@ -// Copyright 2019 Graham Clark. All rights reserved. Use of this source code is governed by the MIT license +// Copyright 2019-2022 Graham Clark. All rights reserved. Use of this source code is governed by the MIT license // that can be found in the LICENSE file. // A port of urwid's palette_test.py example using gowid widgets. diff --git a/examples/gowid-table/table.go b/examples/gowid-table/table.go index 3d917f7..997a027 100644 --- a/examples/gowid-table/table.go +++ b/examples/gowid-table/table.go @@ -1,6 +1,6 @@ //go:generate statik -src=data -// Copyright 2019 Graham Clark. All rights reserved. Use of this source +// Copyright 2019-2022 Graham Clark. All rights reserved. Use of this source // code is governed by the MIT license that can be found in the LICENSE // file. diff --git a/examples/gowid-terminal/terminal.go b/examples/gowid-terminal/terminal.go index 4086c0f..a140ed8 100644 --- a/examples/gowid-terminal/terminal.go +++ b/examples/gowid-terminal/terminal.go @@ -1,4 +1,4 @@ -// Copyright 2019 Graham Clark. All rights reserved. Use of this source code is governed by the MIT license +// Copyright 2019-2022 Graham Clark. All rights reserved. Use of this source code is governed by the MIT license // that can be found in the LICENSE file. // A very poor-man's tmux written using gowid's terminal widget. diff --git a/examples/gowid-tree/tree.go b/examples/gowid-tree/tree.go index 5b7f645..d750026 100644 --- a/examples/gowid-tree/tree.go +++ b/examples/gowid-tree/tree.go @@ -1,4 +1,4 @@ -// Copyright 2019 Graham Clark. All rights reserved. Use of this source +// Copyright 2019-2022 Graham Clark. All rights reserved. Use of this source // code is governed by the MIT license that can be found in the LICENSE // file. diff --git a/examples/gowid-tutorial1/tutorial1.go b/examples/gowid-tutorial1/tutorial1.go index 39b1882..92cd8e2 100644 --- a/examples/gowid-tutorial1/tutorial1.go +++ b/examples/gowid-tutorial1/tutorial1.go @@ -1,4 +1,4 @@ -// Copyright 2019 Graham Clark. All rights reserved. Use of this source code is governed by the MIT license +// Copyright 2019-2022 Graham Clark. All rights reserved. Use of this source code is governed by the MIT license // that can be found in the LICENSE file. // The first example from the gowid tutorial. diff --git a/examples/gowid-tutorial2/tutorial2.go b/examples/gowid-tutorial2/tutorial2.go index 9afd299..15020d4 100644 --- a/examples/gowid-tutorial2/tutorial2.go +++ b/examples/gowid-tutorial2/tutorial2.go @@ -1,4 +1,4 @@ -// Copyright 2019 Graham Clark. All rights reserved. Use of this source code is governed by the MIT license +// Copyright 2019-2022 Graham Clark. All rights reserved. Use of this source code is governed by the MIT license // that can be found in the LICENSE file. // The second example from the gowid tutorial. diff --git a/examples/gowid-tutorial3/tutorial3.go b/examples/gowid-tutorial3/tutorial3.go index 3abccbc..3e0a2dc 100644 --- a/examples/gowid-tutorial3/tutorial3.go +++ b/examples/gowid-tutorial3/tutorial3.go @@ -1,4 +1,4 @@ -// Copyright 2019 Graham Clark. All rights reserved. Use of this source code is governed by the MIT license +// Copyright 2019-2022 Graham Clark. All rights reserved. Use of this source code is governed by the MIT license // that can be found in the LICENSE file. // The third example from the gowid tutorial. diff --git a/examples/gowid-tutorial4/tutorial4.go b/examples/gowid-tutorial4/tutorial4.go index e2584a0..876e446 100644 --- a/examples/gowid-tutorial4/tutorial4.go +++ b/examples/gowid-tutorial4/tutorial4.go @@ -1,4 +1,4 @@ -// Copyright 2019 Graham Clark. All rights reserved. Use of this source code is governed by the MIT license +// Copyright 2019-2022 Graham Clark. All rights reserved. Use of this source code is governed by the MIT license // that can be found in the LICENSE file. // The fourth example from the gowid tutorial. diff --git a/examples/gowid-tutorial5/tutorial5.go b/examples/gowid-tutorial5/tutorial5.go index a296845..9ce9289 100644 --- a/examples/gowid-tutorial5/tutorial5.go +++ b/examples/gowid-tutorial5/tutorial5.go @@ -1,4 +1,4 @@ -// Copyright 2019 Graham Clark. All rights reserved. Use of this source code is governed by the MIT license +// Copyright 2019-2022 Graham Clark. All rights reserved. Use of this source code is governed by the MIT license // that can be found in the LICENSE file. // The fifth example from the gowid tutorial. diff --git a/examples/gowid-tutorial6/tutorial6.go b/examples/gowid-tutorial6/tutorial6.go index d7e84e7..7bd6967 100644 --- a/examples/gowid-tutorial6/tutorial6.go +++ b/examples/gowid-tutorial6/tutorial6.go @@ -1,4 +1,4 @@ -// Copyright 2019 Graham Clark. All rights reserved. Use of this source code is governed by the MIT license +// Copyright 2019-2022 Graham Clark. All rights reserved. Use of this source code is governed by the MIT license // that can be found in the LICENSE file. // The sixth example from the gowid tutorial. diff --git a/examples/gowid-widgets1/widgets1.go b/examples/gowid-widgets1/widgets1.go index 4a2fc58..61cc307 100644 --- a/examples/gowid-widgets1/widgets1.go +++ b/examples/gowid-widgets1/widgets1.go @@ -1,4 +1,4 @@ -// Copyright 2019 Graham Clark. All rights reserved. Use of this source code is governed by the MIT license +// Copyright 2019-2022 Graham Clark. All rights reserved. Use of this source code is governed by the MIT license // that can be found in the LICENSE file. // A gowid test app which exercises the pile, button, edit and progress widgets. diff --git a/examples/gowid-widgets2/widgets2.go b/examples/gowid-widgets2/widgets2.go index 8930cd3..1362580 100644 --- a/examples/gowid-widgets2/widgets2.go +++ b/examples/gowid-widgets2/widgets2.go @@ -1,4 +1,4 @@ -// Copyright 2019 Graham Clark. All rights reserved. Use of this source code is governed by the MIT license +// Copyright 2019-2022 Graham Clark. All rights reserved. Use of this source code is governed by the MIT license // that can be found in the LICENSE file. // A gowid test app which exercises the columns, checkbox, edit and styled widgets. diff --git a/examples/gowid-widgets3/widgets3.go b/examples/gowid-widgets3/widgets3.go index 2be9f8d..c99ff17 100644 --- a/examples/gowid-widgets3/widgets3.go +++ b/examples/gowid-widgets3/widgets3.go @@ -1,4 +1,4 @@ -// Copyright 2019 Graham Clark. All rights reserved. Use of this source code is governed by the MIT license +// Copyright 2019-2022 Graham Clark. All rights reserved. Use of this source code is governed by the MIT license // that can be found in the LICENSE file. // A gowid test app which exercises the button, grid, progress and radio widgets. diff --git a/examples/gowid-widgets4/widgets4.go b/examples/gowid-widgets4/widgets4.go index 955f220..9f91544 100644 --- a/examples/gowid-widgets4/widgets4.go +++ b/examples/gowid-widgets4/widgets4.go @@ -1,4 +1,4 @@ -// Copyright 2019 Graham Clark. All rights reserved. Use of this source code is governed by the MIT license +// Copyright 2019-2022 Graham Clark. All rights reserved. Use of this source code is governed by the MIT license // that can be found in the LICENSE file. // A gowid test app which exercises the columns, list and framed widgets. diff --git a/examples/gowid-widgets5/widgets5.go b/examples/gowid-widgets5/widgets5.go index 4a4a953..0f60b7a 100644 --- a/examples/gowid-widgets5/widgets5.go +++ b/examples/gowid-widgets5/widgets5.go @@ -1,4 +1,4 @@ -// Copyright 2019 Graham Clark. All rights reserved. Use of this source code is governed by the MIT license +// Copyright 2019-2022 Graham Clark. All rights reserved. Use of this source code is governed by the MIT license // that can be found in the LICENSE file. // A gowid test app which exercises the edit and vpadding widgets. diff --git a/examples/gowid-widgets6/widgets6.go b/examples/gowid-widgets6/widgets6.go index 9ceb1f6..e944786 100644 --- a/examples/gowid-widgets6/widgets6.go +++ b/examples/gowid-widgets6/widgets6.go @@ -1,4 +1,4 @@ -// Copyright 2019 Graham Clark. All rights reserved. Use of this source code is governed by the MIT license +// Copyright 2019-2022 Graham Clark. All rights reserved. Use of this source code is governed by the MIT license // that can be found in the LICENSE file. // A gowid test app which exercises the list, edit, columns and styled widgets. diff --git a/examples/gowid-widgets7/widgets7.go b/examples/gowid-widgets7/widgets7.go index 962bc0b..876c2aa 100644 --- a/examples/gowid-widgets7/widgets7.go +++ b/examples/gowid-widgets7/widgets7.go @@ -1,4 +1,4 @@ -// Copyright 2019 Graham Clark. All rights reserved. Use of this source code is governed by the MIT license +// Copyright 2019-2022 Graham Clark. All rights reserved. Use of this source code is governed by the MIT license // that can be found in the LICENSE file. // A gowid test app which exercises the list, edit and framed widgets. diff --git a/examples/gowid-widgets8/widgets8.go b/examples/gowid-widgets8/widgets8.go index 2fe2452..7645186 100644 --- a/examples/gowid-widgets8/widgets8.go +++ b/examples/gowid-widgets8/widgets8.go @@ -1,4 +1,4 @@ -// Copyright 2019 Graham Clark. All rights reserved. Use of this source code is governed by the MIT license +// Copyright 2019-2022 Graham Clark. All rights reserved. Use of this source code is governed by the MIT license // that can be found in the LICENSE file. // A gowid test app which exercises the checkbox, columns and hpadding widgets. diff --git a/examples/utils.go b/examples/utils.go index 0dc3286..91168b6 100644 --- a/examples/utils.go +++ b/examples/utils.go @@ -1,4 +1,4 @@ -// Copyright 2019 Graham Clark. All rights reserved. Use of this source code is governed by the MIT license +// Copyright 2019-2022 Graham Clark. All rights reserved. Use of this source code is governed by the MIT license // that can be found in the LICENSE file. package examples diff --git a/gwtest/support_test.go b/gwtest/support_test.go index 04265e8..518be5f 100644 --- a/gwtest/support_test.go +++ b/gwtest/support_test.go @@ -1,4 +1,4 @@ -// Copyright 2019 Graham Clark. All rights reserved. Use of this source code is governed by the MIT license +// Copyright 2019-2022 Graham Clark. All rights reserved. Use of this source code is governed by the MIT license // that can be found in the LICENSE file. package gwtest diff --git a/gwtest/testutils.go b/gwtest/testutils.go index ffb1d41..f0d80d4 100644 --- a/gwtest/testutils.go +++ b/gwtest/testutils.go @@ -1,4 +1,4 @@ -// Copyright 2019 Graham Clark. All rights reserved. Use of this source +// Copyright 2019-2022 Graham Clark. All rights reserved. Use of this source // code is governed by the MIT license that can be found in the LICENSE // file. diff --git a/gwutil/utils.go b/gwutil/utils.go index 260ed27..4c7e9ed 100644 --- a/gwutil/utils.go +++ b/gwutil/utils.go @@ -1,4 +1,4 @@ -// Copyright 2019 Graham Clark. All rights reserved. Use of this source code is governed by the MIT license +// Copyright 2019-2022 Graham Clark. All rights reserved. Use of this source code is governed by the MIT license // that can be found in the LICENSE file. // Package gwutil provides general-purpose utilities that are not used by diff --git a/gwutil/utils_test.go b/gwutil/utils_test.go index 5244276..2e52e02 100644 --- a/gwutil/utils_test.go +++ b/gwutil/utils_test.go @@ -1,4 +1,4 @@ -// Copyright 2019 Graham Clark. All rights reserved. Use of this source code is governed by the MIT license +// Copyright 2019-2022 Graham Clark. All rights reserved. Use of this source code is governed by the MIT license // that can be found in the LICENSE file. package gwutil diff --git a/support.go b/support.go index e3fa7f1..fb74bd5 100644 --- a/support.go +++ b/support.go @@ -1,4 +1,4 @@ -// Copyright 2019 Graham Clark. All rights reserved. Use of this source +// Copyright 2019-2022 Graham Clark. All rights reserved. Use of this source // code is governed by the MIT license that can be found in the LICENSE // file. diff --git a/utils.go b/utils.go index 4ff6a2f..58d9804 100644 --- a/utils.go +++ b/utils.go @@ -1,4 +1,4 @@ -// Copyright 2019 Graham Clark. All rights reserved. Use of this source code is governed by the MIT license +// Copyright 2019-2022 Graham Clark. All rights reserved. Use of this source code is governed by the MIT license // that can be found in the LICENSE file. package gowid diff --git a/vim/vim_test.go b/vim/vim_test.go index 7fd469d..2d0546a 100644 --- a/vim/vim_test.go +++ b/vim/vim_test.go @@ -1,4 +1,4 @@ -// Copyright 2019 Graham Clark. All rights reserved. Use of this source +// Copyright 2019-2022 Graham Clark. All rights reserved. Use of this source // code is governed by the MIT license that can be found in the LICENSE // file. diff --git a/widgets/asciigraph/asciigraph.go b/widgets/asciigraph/asciigraph.go index ca04b28..79d9b8e 100644 --- a/widgets/asciigraph/asciigraph.go +++ b/widgets/asciigraph/asciigraph.go @@ -1,4 +1,4 @@ -// Copyright 2019 Graham Clark. All rights reserved. Use of this source +// Copyright 2019-2022 Graham Clark. All rights reserved. Use of this source // code is governed by the MIT license that can be found in the LICENSE // file. diff --git a/widgets/asciigraph/asciigraph_test.go b/widgets/asciigraph/asciigraph_test.go index c20a781..5b2955b 100644 --- a/widgets/asciigraph/asciigraph_test.go +++ b/widgets/asciigraph/asciigraph_test.go @@ -1,4 +1,4 @@ -// Copyright 2019 Graham Clark. All rights reserved. Use of this source +// Copyright 2019-2022 Graham Clark. All rights reserved. Use of this source // code is governed by the MIT license that can be found in the LICENSE // file. diff --git a/widgets/bargraph/bargraph.go b/widgets/bargraph/bargraph.go index 2402ab9..b92dd6f 100644 --- a/widgets/bargraph/bargraph.go +++ b/widgets/bargraph/bargraph.go @@ -1,4 +1,4 @@ -// Copyright 2019 Graham Clark. All rights reserved. Use of this source +// Copyright 2019-2022 Graham Clark. All rights reserved. Use of this source // code is governed by the MIT license that can be found in the LICENSE // file. diff --git a/widgets/boxadapter/boxadapter.go b/widgets/boxadapter/boxadapter.go index 835fe8e..d4015d4 100644 --- a/widgets/boxadapter/boxadapter.go +++ b/widgets/boxadapter/boxadapter.go @@ -1,4 +1,4 @@ -// Copyright 2019 Graham Clark. All rights reserved. Use of this source code +// Copyright 2019-2022 Graham Clark. All rights reserved. Use of this source code // is governed by the MIT license that can be found in the LICENSE file. // Package boxadapter provides a widget that will allow a box widget to be used diff --git a/widgets/boxadapter/boxadapter_test.go b/widgets/boxadapter/boxadapter_test.go index ef3dff9..18161d4 100644 --- a/widgets/boxadapter/boxadapter_test.go +++ b/widgets/boxadapter/boxadapter_test.go @@ -1,4 +1,4 @@ -// Copyright 2019 Graham Clark. All rights reserved. Use of this source code is governed by the MIT license +// Copyright 2019-2022 Graham Clark. All rights reserved. Use of this source code is governed by the MIT license // that can be found in the LICENSE file. package boxadapter diff --git a/widgets/button/button.go b/widgets/button/button.go index ff41c20..4a527db 100644 --- a/widgets/button/button.go +++ b/widgets/button/button.go @@ -1,4 +1,4 @@ -// Copyright 2019 Graham Clark. All rights reserved. Use of this source +// Copyright 2019-2022 Graham Clark. All rights reserved. Use of this source // code is governed by the MIT license that can be found in the LICENSE // file. diff --git a/widgets/button/button_test.go b/widgets/button/button_test.go index 8a4eb0b..123b262 100644 --- a/widgets/button/button_test.go +++ b/widgets/button/button_test.go @@ -1,4 +1,4 @@ -// Copyright 2019 Graham Clark. All rights reserved. Use of this source code is governed by the MIT license +// Copyright 2019-2022 Graham Clark. All rights reserved. Use of this source code is governed by the MIT license // that can be found in the LICENSE file. package button diff --git a/widgets/cellmod/cellmod.go b/widgets/cellmod/cellmod.go index 7c961d0..24bf646 100644 --- a/widgets/cellmod/cellmod.go +++ b/widgets/cellmod/cellmod.go @@ -1,4 +1,4 @@ -// Copyright 2019 Graham Clark. All rights reserved. Use of this source +// Copyright 2019-2022 Graham Clark. All rights reserved. Use of this source // code is governed by the MIT license that can be found in the LICENSE // file. diff --git a/widgets/checkbox/checkbox.go b/widgets/checkbox/checkbox.go index 4c9a7ef..7fa0048 100644 --- a/widgets/checkbox/checkbox.go +++ b/widgets/checkbox/checkbox.go @@ -1,4 +1,4 @@ -// Copyright 2019 Graham Clark. All rights reserved. Use of this source +// Copyright 2019-2022 Graham Clark. All rights reserved. Use of this source // code is governed by the MIT license that can be found in the LICENSE // file. diff --git a/widgets/checkbox/checkbox_test.go b/widgets/checkbox/checkbox_test.go index 2161572..4073fbb 100644 --- a/widgets/checkbox/checkbox_test.go +++ b/widgets/checkbox/checkbox_test.go @@ -1,4 +1,4 @@ -// Copyright 2019 Graham Clark. All rights reserved. Use of this source code is governed by the MIT license +// Copyright 2019-2022 Graham Clark. All rights reserved. Use of this source code is governed by the MIT license // that can be found in the LICENSE file. package checkbox diff --git a/widgets/clicktracker/clicktracker.go b/widgets/clicktracker/clicktracker.go index f95ef44..cf1a3bb 100644 --- a/widgets/clicktracker/clicktracker.go +++ b/widgets/clicktracker/clicktracker.go @@ -1,4 +1,4 @@ -// Copyright 2019 Graham Clark. All rights reserved. Use of this source +// Copyright 2019-2022 Graham Clark. All rights reserved. Use of this source // code is governed by the MIT license that can be found in the LICENSE // file. diff --git a/widgets/columns/columns.go b/widgets/columns/columns.go index ca729c4..a4ea888 100644 --- a/widgets/columns/columns.go +++ b/widgets/columns/columns.go @@ -1,4 +1,4 @@ -// Copyright 2019 Graham Clark. All rights reserved. Use of this source +// Copyright 2019-2022 Graham Clark. All rights reserved. Use of this source // code is governed by the MIT license that can be found in the LICENSE // file. diff --git a/widgets/columns/columns_test.go b/widgets/columns/columns_test.go index f20e1b4..49c77ec 100644 --- a/widgets/columns/columns_test.go +++ b/widgets/columns/columns_test.go @@ -1,4 +1,4 @@ -// Copyright 2019 Graham Clark. All rights reserved. Use of this source +// Copyright 2019-2022 Graham Clark. All rights reserved. Use of this source // code is governed by the MIT license that can be found in the LICENSE // file. diff --git a/widgets/dialog/dialog.go b/widgets/dialog/dialog.go index f492cde..64900a9 100644 --- a/widgets/dialog/dialog.go +++ b/widgets/dialog/dialog.go @@ -1,4 +1,4 @@ -// Copyright 2019 Graham Clark. All rights reserved. Use of this source +// Copyright 2019-2022 Graham Clark. All rights reserved. Use of this source // code is governed by the MIT license that can be found in the LICENSE // file. diff --git a/widgets/disable/disable.go b/widgets/disable/disable.go index 0ad8dfb..1064a52 100644 --- a/widgets/disable/disable.go +++ b/widgets/disable/disable.go @@ -1,4 +1,4 @@ -// Copyright 2019 Graham Clark. All rights reserved. Use of this source +// Copyright 2019-2022 Graham Clark. All rights reserved. Use of this source // code is governed by the MIT license that can be found in the LICENSE // file. diff --git a/widgets/divider/divider.go b/widgets/divider/divider.go index df42c81..bd712ad 100644 --- a/widgets/divider/divider.go +++ b/widgets/divider/divider.go @@ -1,4 +1,4 @@ -// Copyright 2019 Graham Clark. All rights reserved. Use of this source +// Copyright 2019-2022 Graham Clark. All rights reserved. Use of this source // code is governed by the MIT license that can be found in the LICENSE // file. diff --git a/widgets/divider/divider_test.go b/widgets/divider/divider_test.go index 1d99c68..88cd0e0 100644 --- a/widgets/divider/divider_test.go +++ b/widgets/divider/divider_test.go @@ -1,4 +1,4 @@ -// Copyright 2019 Graham Clark. All rights reserved. Use of this source code is governed by the MIT license +// Copyright 2019-2022 Graham Clark. All rights reserved. Use of this source code is governed by the MIT license // that can be found in the LICENSE file. package divider diff --git a/widgets/edit/edit.go b/widgets/edit/edit.go index 385e1ec..d1fbb2d 100644 --- a/widgets/edit/edit.go +++ b/widgets/edit/edit.go @@ -1,4 +1,4 @@ -// Copyright 2019 Graham Clark. All rights reserved. Use of this source +// Copyright 2019-2022 Graham Clark. All rights reserved. Use of this source // code is governed by the MIT license that can be found in the LICENSE // file. diff --git a/widgets/edit/edit_test.go b/widgets/edit/edit_test.go index 5fbc682..cc6e6bf 100644 --- a/widgets/edit/edit_test.go +++ b/widgets/edit/edit_test.go @@ -1,4 +1,4 @@ -// Copyright 2019 Graham Clark. All rights reserved. Use of this source code is governed by the MIT license +// Copyright 2019-2022 Graham Clark. All rights reserved. Use of this source code is governed by the MIT license // that can be found in the LICENSE file. package edit diff --git a/widgets/fill/fill.go b/widgets/fill/fill.go index 2ec5fe8..6283eb1 100644 --- a/widgets/fill/fill.go +++ b/widgets/fill/fill.go @@ -1,4 +1,4 @@ -// Copyright 2019 Graham Clark. All rights reserved. Use of this source +// Copyright 2019-2022 Graham Clark. All rights reserved. Use of this source // code is governed by the MIT license that can be found in the LICENSE // file. diff --git a/widgets/fill/fill_test.go b/widgets/fill/fill_test.go index 3faf297..b0e73e3 100644 --- a/widgets/fill/fill_test.go +++ b/widgets/fill/fill_test.go @@ -1,4 +1,4 @@ -// Copyright 2019 Graham Clark. All rights reserved. Use of this source +// Copyright 2019-2022 Graham Clark. All rights reserved. Use of this source // code is governed by the MIT license that can be found in the LICENSE // file. diff --git a/widgets/fixedadapter/fixedadapter.go b/widgets/fixedadapter/fixedadapter.go index 35531c3..2d96249 100644 --- a/widgets/fixedadapter/fixedadapter.go +++ b/widgets/fixedadapter/fixedadapter.go @@ -1,4 +1,4 @@ -// Copyright 2019 Graham Clark. All rights reserved. Use of this source code is governed by the MIT license +// Copyright 2019-2022 Graham Clark. All rights reserved. Use of this source code is governed by the MIT license // that can be found in the LICENSE file. // Package fixedadaptor provides a widget that will render a fixed widget when diff --git a/widgets/fixedadapter/fixedadapter_test.go b/widgets/fixedadapter/fixedadapter_test.go index f69066d..4c42013 100644 --- a/widgets/fixedadapter/fixedadapter_test.go +++ b/widgets/fixedadapter/fixedadapter_test.go @@ -1,4 +1,4 @@ -// Copyright 2019 Graham Clark. All rights reserved. Use of this source code is governed by the MIT license +// Copyright 2019-2022 Graham Clark. All rights reserved. Use of this source code is governed by the MIT license // that can be found in the LICENSE file. package fixedadapter diff --git a/widgets/framed/framed.go b/widgets/framed/framed.go index 73dcc1d..b700376 100644 --- a/widgets/framed/framed.go +++ b/widgets/framed/framed.go @@ -1,4 +1,4 @@ -// Copyright 2019 Graham Clark. All rights reserved. Use of this source +// Copyright 2019-2022 Graham Clark. All rights reserved. Use of this source // code is governed by the MIT license that can be found in the LICENSE // file. diff --git a/widgets/framed/framed_test.go b/widgets/framed/framed_test.go index 6f96be6..bec6bed 100644 --- a/widgets/framed/framed_test.go +++ b/widgets/framed/framed_test.go @@ -1,4 +1,4 @@ -// Copyright 2019 Graham Clark. All rights reserved. Use of this source code is governed by the MIT license +// Copyright 2019-2022 Graham Clark. All rights reserved. Use of this source code is governed by the MIT license // that can be found in the LICENSE file. package framed diff --git a/widgets/grid/grid.go b/widgets/grid/grid.go index 2d9678b..3c099c4 100644 --- a/widgets/grid/grid.go +++ b/widgets/grid/grid.go @@ -1,4 +1,4 @@ -// Copyright 2019 Graham Clark. All rights reserved. Use of this source +// Copyright 2019-2022 Graham Clark. All rights reserved. Use of this source // code is governed by the MIT license that can be found in the LICENSE // file. diff --git a/widgets/grid/grid_test.go b/widgets/grid/grid_test.go index 87fa1ca..c763cec 100644 --- a/widgets/grid/grid_test.go +++ b/widgets/grid/grid_test.go @@ -1,4 +1,4 @@ -// Copyright 2019 Graham Clark. All rights reserved. Use of this source +// Copyright 2019-2022 Graham Clark. All rights reserved. Use of this source // code is governed by the MIT license that can be found in the LICENSE // file. diff --git a/widgets/holder/holder.go b/widgets/holder/holder.go index 07e7c52..d2251f6 100644 --- a/widgets/holder/holder.go +++ b/widgets/holder/holder.go @@ -1,4 +1,4 @@ -// Copyright 2019 Graham Clark. All rights reserved. Use of this source +// Copyright 2019-2022 Graham Clark. All rights reserved. Use of this source // code is governed by the MIT license that can be found in the LICENSE // file. diff --git a/widgets/hpadding/hpadding.go b/widgets/hpadding/hpadding.go index 9fa8169..35b96c3 100644 --- a/widgets/hpadding/hpadding.go +++ b/widgets/hpadding/hpadding.go @@ -1,4 +1,4 @@ -// Copyright 2019 Graham Clark. All rights reserved. Use of this source +// Copyright 2019-2022 Graham Clark. All rights reserved. Use of this source // code is governed by the MIT license that can be found in the LICENSE // file. diff --git a/widgets/hpadding/hpadding_test.go b/widgets/hpadding/hpadding_test.go index 0b9bbf1..cf4c77f 100644 --- a/widgets/hpadding/hpadding_test.go +++ b/widgets/hpadding/hpadding_test.go @@ -1,4 +1,4 @@ -// Copyright 2019 Graham Clark. All rights reserved. Use of this source +// Copyright 2019-2022 Graham Clark. All rights reserved. Use of this source // code is governed by the MIT license that can be found in the LICENSE // file. diff --git a/widgets/isselected/isselected.go b/widgets/isselected/isselected.go index 873769c..ada4b61 100644 --- a/widgets/isselected/isselected.go +++ b/widgets/isselected/isselected.go @@ -1,4 +1,4 @@ -// Copyright 2019 Graham Clark. All rights reserved. Use of this source +// Copyright 2019-2022 Graham Clark. All rights reserved. Use of this source // code is governed by the MIT license that can be found in the LICENSE // file. diff --git a/widgets/keypress/keypress.go b/widgets/keypress/keypress.go index 5c4e4b9..6ea022d 100644 --- a/widgets/keypress/keypress.go +++ b/widgets/keypress/keypress.go @@ -1,4 +1,4 @@ -// Copyright 2019 Graham Clark. All rights reserved. Use of this source +// Copyright 2019-2022 Graham Clark. All rights reserved. Use of this source // code is governed by the MIT license that can be found in the LICENSE // file. diff --git a/widgets/keypress/keypress_test.go b/widgets/keypress/keypress_test.go index 830fbb8..0e1f899 100644 --- a/widgets/keypress/keypress_test.go +++ b/widgets/keypress/keypress_test.go @@ -1,4 +1,4 @@ -// Copyright 2019 Graham Clark. All rights reserved. Use of this source code is governed by the MIT license +// Copyright 2019-2022 Graham Clark. All rights reserved. Use of this source code is governed by the MIT license // that can be found in the LICENSE file. package keypress diff --git a/widgets/list/list.go b/widgets/list/list.go index d364d50..927f702 100644 --- a/widgets/list/list.go +++ b/widgets/list/list.go @@ -1,4 +1,4 @@ -// Copyright 2019 Graham Clark. All rights reserved. Use of this source +// Copyright 2019-2022 Graham Clark. All rights reserved. Use of this source // code is governed by the MIT license that can be found in the LICENSE // file. diff --git a/widgets/list/list_test.go b/widgets/list/list_test.go index d769f47..dbdb5b6 100644 --- a/widgets/list/list_test.go +++ b/widgets/list/list_test.go @@ -1,4 +1,4 @@ -// Copyright 2019 Graham Clark. All rights reserved. Use of this source code is governed by the MIT license +// Copyright 2019-2022 Graham Clark. All rights reserved. Use of this source code is governed by the MIT license // that can be found in the LICENSE file. package list diff --git a/widgets/menu/menu.go b/widgets/menu/menu.go index 4f8af19..bc55050 100644 --- a/widgets/menu/menu.go +++ b/widgets/menu/menu.go @@ -1,4 +1,4 @@ -// Copyright 2019 Graham Clark. All rights reserved. Use of this source +// Copyright 2019-2022 Graham Clark. All rights reserved. Use of this source // code is governed by the MIT license that can be found in the LICENSE // file. diff --git a/widgets/null/null.go b/widgets/null/null.go index e87cf0c..2987926 100644 --- a/widgets/null/null.go +++ b/widgets/null/null.go @@ -1,4 +1,4 @@ -// Copyright 2019 Graham Clark. All rights reserved. Use of this source +// Copyright 2019-2022 Graham Clark. All rights reserved. Use of this source // code is governed by the MIT license that can be found in the LICENSE // file. diff --git a/widgets/overlay/overlay.go b/widgets/overlay/overlay.go index 68f7ea6..6bd38ef 100644 --- a/widgets/overlay/overlay.go +++ b/widgets/overlay/overlay.go @@ -1,4 +1,4 @@ -// Copyright 2019 Graham Clark. All rights reserved. Use of this source +// Copyright 2019-2022 Graham Clark. All rights reserved. Use of this source // code is governed by the MIT license that can be found in the LICENSE // file. diff --git a/widgets/padding/padding.go b/widgets/padding/padding.go index 51ab224..3841612 100644 --- a/widgets/padding/padding.go +++ b/widgets/padding/padding.go @@ -1,4 +1,4 @@ -// Copyright 2019 Graham Clark. All rights reserved. Use of this source +// Copyright 2019-2022 Graham Clark. All rights reserved. Use of this source // code is governed by the MIT license that can be found in the LICENSE // file. diff --git a/widgets/padding/padding_test.go b/widgets/padding/padding_test.go index 4f16623..2ccbc3a 100644 --- a/widgets/padding/padding_test.go +++ b/widgets/padding/padding_test.go @@ -1,4 +1,4 @@ -// Copyright 2019 Graham Clark. All rights reserved. Use of this source code is governed by the MIT license +// Copyright 2019-2022 Graham Clark. All rights reserved. Use of this source code is governed by the MIT license // that can be found in the LICENSE file. package padding diff --git a/widgets/palettemap/palettemap.go b/widgets/palettemap/palettemap.go index 1e13e95..e0b639d 100644 --- a/widgets/palettemap/palettemap.go +++ b/widgets/palettemap/palettemap.go @@ -1,4 +1,4 @@ -// Copyright 2019 Graham Clark. All rights reserved. Use of this source +// Copyright 2019-2022 Graham Clark. All rights reserved. Use of this source // code is governed by the MIT license that can be found in the LICENSE // file. diff --git a/widgets/pile/pile.go b/widgets/pile/pile.go index 8538a7b..0ac12d3 100644 --- a/widgets/pile/pile.go +++ b/widgets/pile/pile.go @@ -1,4 +1,4 @@ -// Copyright 2019 Graham Clark. All rights reserved. Use of this source +// Copyright 2019-2022 Graham Clark. All rights reserved. Use of this source // code is governed by the MIT license that can be found in the LICENSE // file. diff --git a/widgets/pile/pile_test.go b/widgets/pile/pile_test.go index d632d22..70f0561 100644 --- a/widgets/pile/pile_test.go +++ b/widgets/pile/pile_test.go @@ -1,4 +1,4 @@ -// Copyright 2019 Graham Clark. All rights reserved. Use of this source code is governed by the MIT license +// Copyright 2019-2022 Graham Clark. All rights reserved. Use of this source code is governed by the MIT license // that can be found in the LICENSE file. package pile diff --git a/widgets/progress/progress.go b/widgets/progress/progress.go index 8871b08..887e1f8 100644 --- a/widgets/progress/progress.go +++ b/widgets/progress/progress.go @@ -1,4 +1,4 @@ -// Copyright 2019 Graham Clark. All rights reserved. Use of this source +// Copyright 2019-2022 Graham Clark. All rights reserved. Use of this source // code is governed by the MIT license that can be found in the LICENSE // file. diff --git a/widgets/progress/progress_test.go b/widgets/progress/progress_test.go index 7a5f6e9..4f8f2a5 100644 --- a/widgets/progress/progress_test.go +++ b/widgets/progress/progress_test.go @@ -1,4 +1,4 @@ -// Copyright 2019 Graham Clark. All rights reserved. Use of this source code is governed by the MIT license +// Copyright 2019-2022 Graham Clark. All rights reserved. Use of this source code is governed by the MIT license // that can be found in the LICENSE file. package progress diff --git a/widgets/radio/radio.go b/widgets/radio/radio.go index a37cf06..cde8989 100644 --- a/widgets/radio/radio.go +++ b/widgets/radio/radio.go @@ -1,4 +1,4 @@ -// Copyright 2019 Graham Clark. All rights reserved. Use of this source +// Copyright 2019-2022 Graham Clark. All rights reserved. Use of this source // code is governed by the MIT license that can be found in the LICENSE // file. diff --git a/widgets/radio/radio_test.go b/widgets/radio/radio_test.go index 29065fc..d201a79 100644 --- a/widgets/radio/radio_test.go +++ b/widgets/radio/radio_test.go @@ -1,4 +1,4 @@ -// Copyright 2019 Graham Clark. All rights reserved. Use of this source code is governed by the MIT license +// Copyright 2019-2022 Graham Clark. All rights reserved. Use of this source code is governed by the MIT license // that can be found in the LICENSE file. package radio diff --git a/widgets/selectable/selectable.go b/widgets/selectable/selectable.go index 29f756a..d23e174 100644 --- a/widgets/selectable/selectable.go +++ b/widgets/selectable/selectable.go @@ -1,4 +1,4 @@ -// Copyright 2019 Graham Clark. All rights reserved. Use of this source +// Copyright 2019-2022 Graham Clark. All rights reserved. Use of this source // code is governed by the MIT license that can be found in the LICENSE // file. diff --git a/widgets/shadow/shadow.go b/widgets/shadow/shadow.go index 6041e85..1e86f70 100644 --- a/widgets/shadow/shadow.go +++ b/widgets/shadow/shadow.go @@ -1,4 +1,4 @@ -// Copyright 2019 Graham Clark. All rights reserved. Use of this source +// Copyright 2019-2022 Graham Clark. All rights reserved. Use of this source // code is governed by the MIT license that can be found in the LICENSE // file. diff --git a/widgets/spinner/spinner.go b/widgets/spinner/spinner.go index ed838e7..139f2c7 100644 --- a/widgets/spinner/spinner.go +++ b/widgets/spinner/spinner.go @@ -1,4 +1,4 @@ -// Copyright 2019 Graham Clark. All rights reserved. Use of this source +// Copyright 2019-2022 Graham Clark. All rights reserved. Use of this source // code is governed by the MIT license that can be found in the LICENSE // file. diff --git a/widgets/styled/styled.go b/widgets/styled/styled.go index e5c0741..7e6e357 100644 --- a/widgets/styled/styled.go +++ b/widgets/styled/styled.go @@ -1,4 +1,4 @@ -// Copyright 2019 Graham Clark. All rights reserved. Use of this source +// Copyright 2019-2022 Graham Clark. All rights reserved. Use of this source // code is governed by the MIT license that can be found in the LICENSE // file. diff --git a/widgets/styled/styled_test.go b/widgets/styled/styled_test.go index 2eb683c..5371e00 100644 --- a/widgets/styled/styled_test.go +++ b/widgets/styled/styled_test.go @@ -1,4 +1,4 @@ -// Copyright 2019 Graham Clark. All rights reserved. Use of this source +// Copyright 2019-2022 Graham Clark. All rights reserved. Use of this source // code is governed by the MIT license that can be found in the LICENSE // file. diff --git a/widgets/table/simple_model.go b/widgets/table/simple_model.go index 27f0db4..5e0c5af 100644 --- a/widgets/table/simple_model.go +++ b/widgets/table/simple_model.go @@ -1,6 +1,6 @@ //go:generate statik -src=data -// Copyright 2019 Graham Clark. All rights reserved. Use of this source +// Copyright 2019-2022 Graham Clark. All rights reserved. Use of this source // code is governed by the MIT license that can be found in the LICENSE // file. diff --git a/widgets/table/table.go b/widgets/table/table.go index e79e277..5deb166 100644 --- a/widgets/table/table.go +++ b/widgets/table/table.go @@ -1,4 +1,4 @@ -// Copyright 2019 Graham Clark. All rights reserved. Use of this source +// Copyright 2019-2022 Graham Clark. All rights reserved. Use of this source // code is governed by the MIT license that can be found in the LICENSE // file. diff --git a/widgets/table/table_test.go b/widgets/table/table_test.go index a4e8cf3..bdc6cd2 100644 --- a/widgets/table/table_test.go +++ b/widgets/table/table_test.go @@ -1,4 +1,4 @@ -// Copyright 2019 Graham Clark. All rights reserved. Use of this source +// Copyright 2019-2022 Graham Clark. All rights reserved. Use of this source // code is governed by the MIT license that can be found in the LICENSE // file. diff --git a/widgets/terminal/term_canvas.go b/widgets/terminal/term_canvas.go index 8c30018..cfa35ac 100644 --- a/widgets/terminal/term_canvas.go +++ b/widgets/terminal/term_canvas.go @@ -1,4 +1,4 @@ -// Copyright 2019 Graham Clark. All rights reserved. Use of this source +// Copyright 2019-2022 Graham Clark. All rights reserved. Use of this source // code is governed by the MIT license that can be found in the LICENSE // file. diff --git a/widgets/terminal/terminal.go b/widgets/terminal/terminal.go index 34e8c61..3378540 100644 --- a/widgets/terminal/terminal.go +++ b/widgets/terminal/terminal.go @@ -1,4 +1,4 @@ -// Copyright 2019 Graham Clark. All rights reserved. Use of this source +// Copyright 2019-2022 Graham Clark. All rights reserved. Use of this source // code is governed by the MIT license that can be found in the LICENSE // file. diff --git a/widgets/terminal/terminal_test.go b/widgets/terminal/terminal_test.go index f0ee2af..934538e 100644 --- a/widgets/terminal/terminal_test.go +++ b/widgets/terminal/terminal_test.go @@ -1,4 +1,4 @@ -// Copyright 2019 Graham Clark. All rights reserved. Use of this source +// Copyright 2019-2022 Graham Clark. All rights reserved. Use of this source // code is governed by the MIT license that can be found in the LICENSE // file. diff --git a/widgets/terminal/utils.go b/widgets/terminal/utils.go index 1ecab02..441f34f 100644 --- a/widgets/terminal/utils.go +++ b/widgets/terminal/utils.go @@ -1,4 +1,4 @@ -// Copyright 2019 Graham Clark. All rights reserved. Use of this source code is governed by the MIT license +// Copyright 2019-2022 Graham Clark. All rights reserved. Use of this source code is governed by the MIT license // that can be found in the LICENSE file. // Based heavily on vterm.py from urwid diff --git a/widgets/text/testwidget.go b/widgets/text/testwidget.go index a67107e..9ed7288 100644 --- a/widgets/text/testwidget.go +++ b/widgets/text/testwidget.go @@ -1,4 +1,4 @@ -// Copyright 2019 Graham Clark. All rights reserved. Use of this source +// Copyright 2019-2022 Graham Clark. All rights reserved. Use of this source // code is governed by the MIT license that can be found in the LICENSE // file. diff --git a/widgets/text/text.go b/widgets/text/text.go index d51ce47..219b404 100644 --- a/widgets/text/text.go +++ b/widgets/text/text.go @@ -1,4 +1,4 @@ -// Copyright 2019 Graham Clark. All rights reserved. Use of this source +// Copyright 2019-2022 Graham Clark. All rights reserved. Use of this source // code is governed by the MIT license that can be found in the LICENSE // file. diff --git a/widgets/text/text_test.go b/widgets/text/text_test.go index bbf1e98..f284d28 100644 --- a/widgets/text/text_test.go +++ b/widgets/text/text_test.go @@ -1,4 +1,4 @@ -// Copyright 2019 Graham Clark. All rights reserved. Use of this source code is governed by the MIT license +// Copyright 2019-2022 Graham Clark. All rights reserved. Use of this source code is governed by the MIT license // that can be found in the LICENSE file. package text diff --git a/widgets/tree/tree.go b/widgets/tree/tree.go index 96e210f..e40d8f0 100644 --- a/widgets/tree/tree.go +++ b/widgets/tree/tree.go @@ -1,4 +1,4 @@ -// Copyright 2019 Graham Clark. All rights reserved. Use of this source +// Copyright 2019-2022 Graham Clark. All rights reserved. Use of this source // code is governed by the MIT license that can be found in the LICENSE // file. diff --git a/widgets/tree/tree_test.go b/widgets/tree/tree_test.go index 0fcacc8..2d90080 100644 --- a/widgets/tree/tree_test.go +++ b/widgets/tree/tree_test.go @@ -1,4 +1,4 @@ -// Copyright 2019 Graham Clark. All rights reserved. Use of this source code is governed by the MIT license +// Copyright 2019-2022 Graham Clark. All rights reserved. Use of this source code is governed by the MIT license // that can be found in the LICENSE file. package tree diff --git a/widgets/vpadding/vpadding.go b/widgets/vpadding/vpadding.go index 13bacd5..26f1ac7 100644 --- a/widgets/vpadding/vpadding.go +++ b/widgets/vpadding/vpadding.go @@ -1,4 +1,4 @@ -// Copyright 2019 Graham Clark. All rights reserved. Use of this source +// Copyright 2019-2022 Graham Clark. All rights reserved. Use of this source // code is governed by the MIT license that can be found in the LICENSE // file. diff --git a/widgets/vpadding/vpadding_test.go b/widgets/vpadding/vpadding_test.go index f81a29e..ebe07fc 100644 --- a/widgets/vpadding/vpadding_test.go +++ b/widgets/vpadding/vpadding_test.go @@ -1,4 +1,4 @@ -// Copyright 2019 Graham Clark. All rights reserved. Use of this source code is governed by the MIT license +// Copyright 2019-2022 Graham Clark. All rights reserved. Use of this source code is governed by the MIT license // that can be found in the LICENSE file. package vpadding diff --git a/widgets/vscroll/vscroll.go b/widgets/vscroll/vscroll.go index 13c4b60..8799a34 100644 --- a/widgets/vscroll/vscroll.go +++ b/widgets/vscroll/vscroll.go @@ -1,4 +1,4 @@ -// Copyright 2019 Graham Clark. All rights reserved. Use of this source +// Copyright 2019-2022 Graham Clark. All rights reserved. Use of this source // code is governed by the MIT license that can be found in the LICENSE // file. diff --git a/widgets/vscroll/vscroll_test.go b/widgets/vscroll/vscroll_test.go index d1ba80e..d6dd0e6 100644 --- a/widgets/vscroll/vscroll_test.go +++ b/widgets/vscroll/vscroll_test.go @@ -1,4 +1,4 @@ -// Copyright 2019 Graham Clark. All rights reserved. Use of this source code is governed by the MIT license +// Copyright 2019-2022 Graham Clark. All rights reserved. Use of this source code is governed by the MIT license // that can be found in the LICENSE file. package vscroll From a594805196f2159ca4bd826e9724096302b12a3f Mon Sep 17 00:00:00 2001 From: Graham Clark Date: Sun, 26 Jun 2022 16:35:58 -0400 Subject: [PATCH 3/7] Reduce use of legacy GOWID_TTY variable This variable was useful before tcell had the ability to construct a screen with a given tty. I used a fork of tcell that used this variable internally, and didn't modify any of the tcell APIs. Now tcell/v2 allows a tty to be specified, so now I am adding a parameter to the App constructor to provide a tty, then using that preferably. --- app.go | 7 +++++-- screen.go | 11 +++++++---- 2 files changed, 12 insertions(+), 6 deletions(-) diff --git a/app.go b/app.go index f43b329..87d8891 100644 --- a/app.go +++ b/app.go @@ -101,6 +101,7 @@ type App struct { enableBracketedPaste bool screenInited bool dontOwnScreen bool + tty string lastMouse MouseState // So I can tell if a button was previously clicked MouseState // Track which mouse buttons are currently down @@ -119,6 +120,7 @@ type AppArgs struct { EnableBracketedPaste bool Log log.StdLogger DontActivate bool + Tty string } // IUnhandledInput is used as a handler for application user input that is not handled by any @@ -243,7 +245,7 @@ func newApp(args AppArgs) (rapp *App, rerr error) { screen := args.Screen if screen == nil { var err error - screen, err = tcellScreen() + screen, err = tcellScreen(args.Tty) if err != nil { rerr = WithKVs(err, map[string]interface{}{"TERM": os.Getenv("TERM")}) return @@ -286,6 +288,7 @@ func newApp(args AppArgs) (rapp *App, rerr error) { enableMouseMotion: args.EnableMouseMotion, enableBracketedPaste: args.EnableBracketedPaste, dontOwnScreen: args.Screen != nil, + tty: args.Tty, } if !res.dontOwnScreen && !args.DontActivate { @@ -814,7 +817,7 @@ func (a *App) Quit() { // // Assumes we own the screen... func (a *App) ActivateScreen() error { - screen, err := tcellScreen() + screen, err := tcellScreen(a.tty) if err != nil { return WithKVs(err, map[string]interface{}{"TERM": os.Getenv("TERM")}) } diff --git a/screen.go b/screen.go index 226a933..f44fb89 100644 --- a/screen.go +++ b/screen.go @@ -14,19 +14,22 @@ import ( //====================================================================== -func tcellScreen() (tcell.Screen, error) { +func tcellScreen(ttys string) (tcell.Screen, error) { var tty tcell.Tty var err error - tty, err = tcell.NewDevTtyFromDev(bestTty()) + tty, err = tcell.NewDevTtyFromDev(bestTty(ttys)) if err != nil { - return nil, WithKVs(err, map[string]interface{}{"GOWID_TTY": os.Getenv("GOWID_TTY")}) + return nil, WithKVs(err, map[string]interface{}{"tty": ttys}) } return tcell.NewTerminfoScreenFromTty(tty) } -func bestTty() string { +func bestTty(tty string) string { + if tty != "" { + return tty + } gwtty := os.Getenv("GOWID_TTY") if gwtty != "" { return gwtty From 5f3e0e82f1ade319aff80889a2ef4be7d0d0d09c Mon Sep 17 00:00:00 2001 From: Graham Clark Date: Sun, 26 Jun 2022 17:06:08 -0400 Subject: [PATCH 4/7] I broke the Windows build This tty variable is ignored on Windows. --- screen_windows.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/screen_windows.go b/screen_windows.go index 7840e5b..4d356a4 100644 --- a/screen_windows.go +++ b/screen_windows.go @@ -11,7 +11,7 @@ import ( //====================================================================== -func tcellScreen() (tcell.Screen, error) { +func tcellScreen(tty string) (tcell.Screen, error) { return tcell.NewScreen() } From b9388979e96068ba38f039d2f027838e9faba214 Mon Sep 17 00:00:00 2001 From: Graham Clark Date: Sun, 3 Jul 2022 14:09:54 -0400 Subject: [PATCH 5/7] An option to the overlay widget to apply upper style unilaterally When merging a lower canvas L beneath an upper canvas U, the following rules apply: - the returned canvas uses U's rune if set, otherwise L's - the returned canvas uses U's color(s) if set, otherwise L's - for each of the various style types S (bold, underline, etc) - the return canvas uses U's pref for S, if provided, otherwise L's The main point here is that the upper canvas U has to affirmatively disable a particular style for L's setting not to take effect. This provides for the most flexibility, allowing overlays to combine styles, but provides a default that most applications probably wouldn't want. Applications that e.g. display a dialog widget would be better served with a default that uses the upper canvas's style. This changes adds an option to the overlay widget to unilaterally choose the upper canvas's style. There are some test cases too. --- widgets/overlay/overlay.go | 52 ++++++++++++++++++++++++++++++++- widgets/overlay/overlay_test.go | 41 ++++++++++++++++++++++++++ 2 files changed, 92 insertions(+), 1 deletion(-) create mode 100644 widgets/overlay/overlay_test.go diff --git a/widgets/overlay/overlay.go b/widgets/overlay/overlay.go index 6bd38ef..770164e 100644 --- a/widgets/overlay/overlay.go +++ b/widgets/overlay/overlay.go @@ -70,6 +70,10 @@ type IOverlay interface { BottomGetsCursor() bool } +type IIgnoreLowerStyle interface { + IgnoreLowerStyle() bool +} + type IWidget interface { gowid.IWidget IOverlay @@ -100,6 +104,8 @@ type Widget struct { Callbacks *gowid.Callbacks } +var _ IIgnoreLowerStyle = (*Widget)(nil) + // For callback registration type Top struct{} type Bottom struct{} @@ -108,6 +114,7 @@ type Options struct { BottomGetsFocus bool TopGetsNoFocus bool BottomGetsCursor bool + IgnoreLowerStyle bool } func New(top, bottom gowid.IWidget, @@ -235,6 +242,10 @@ func (w *Widget) SetSubWidget(inner gowid.IWidget, app gowid.IApp) { } } +func (w *Widget) IgnoreLowerStyle() bool { + return w.opts.IgnoreLowerStyle +} + //====================================================================== func UserInput(w IOverlay, ev interface{}, size gowid.IRenderSize, focus gowid.Selector, app gowid.IApp) bool { @@ -262,6 +273,30 @@ func UserInput(w IOverlay, ev interface{}, size gowid.IRenderSize, focus gowid.S return res } +// Merge cells as follows - use upper rune if set, use upper colors if set, +// and use upper style only (don't let any lower run style bleed through) +func mergeAllExceptUpperStyle(lower gowid.Cell, upper gowid.Cell) gowid.Cell { + res := lower + if upper.HasRune() { + res = res.WithRune(upper.Rune()) + } + + ufg, ubg, _ := upper.GetDisplayAttrs() + if ubg != gowid.ColorNone { + res = res.WithBackgroundColor(ubg) + } + if ufg != gowid.ColorNone { + res = res.WithForegroundColor(ufg) + } + + res = res.WithStyle(upper.Style()) + return res +} + +type iMergeWithFuncCanvas interface { + MergeWithFunc(gowid.IMergeCanvas, int, int, gowid.CellMergeFunc, bool) +} + func Render(w IOverlay, size gowid.IRenderSize, focus gowid.Selector, app gowid.IApp) gowid.ICanvas { bfocus := focus.And(w.BottomGetsFocus()) tfocus := focus.And(w.TopGetsFocus()) @@ -273,7 +308,22 @@ func Render(w IOverlay, size gowid.IRenderSize, focus gowid.Selector, app gowid. bottomC2 := bottomC.Duplicate() p2 := padding.New(w.Top(), w.VAlign(), w.Height(), w.HAlign(), w.Width()) topC := p2.Render(size, tfocus, app) - bottomC2.MergeUnder(topC, 0, 0, w.BottomGetsCursor()) + + var bottomC2mc iMergeWithFuncCanvas + ign := false + if wIgn, ok := w.(IIgnoreLowerStyle); ok { + if gc, ok := bottomC2.(iMergeWithFuncCanvas); ok { + bottomC2mc = gc + ign = wIgn.IgnoreLowerStyle() + } + } + + if ign { + bottomC2mc.MergeWithFunc(topC, 0, 0, mergeAllExceptUpperStyle, w.BottomGetsCursor()) + } else { + bottomC2.MergeUnder(topC, 0, 0, w.BottomGetsCursor()) + } + return bottomC2 } } diff --git a/widgets/overlay/overlay_test.go b/widgets/overlay/overlay_test.go new file mode 100644 index 0000000..2e7f860 --- /dev/null +++ b/widgets/overlay/overlay_test.go @@ -0,0 +1,41 @@ +// Copyright 2019-2022 Graham Clark. All rights reserved. Use of this source +// code is governed by the MIT license that can be found in the LICENSE +// file. + +package overlay + +import ( + "testing" + + "github.com/gcla/gowid" + "github.com/gcla/gowid/gwtest" + "github.com/gcla/gowid/widgets/styled" + "github.com/gcla/gowid/widgets/text" + "github.com/gdamore/tcell/v2" + "github.com/stretchr/testify/assert" +) + +func TestOverlay1(t *testing.T) { + tw := text.New("top") + bw := text.New("bottom") + ov := New(tw, bw, gowid.VAlignTop{}, gowid.RenderFixed{}, gowid.HAlignLeft{}, gowid.RenderFixed{}) + c := ov.Render(gowid.RenderFlowWith{C: 6}, gowid.Focused, gwtest.D) + assert.Equal(t, "toptom", c.String()) + + bwStyled := styled.New(bw, gowid.MakeStyledAs(gowid.StyleBold)) + + // When the widget is created this way, the style from the lower widget bleeds through + ov = New(tw, bwStyled, gowid.VAlignTop{}, gowid.RenderFixed{}, gowid.HAlignLeft{}, gowid.RenderFixed{}) + c = ov.Render(gowid.RenderFlowWith{C: 6}, gowid.Focused, gwtest.D) + assert.Equal(t, "toptom", c.String()) + assert.Equal(t, tcell.AttrBold, c.CellAt(0, 0).Style().OnOff&tcell.AttrBold) + + // When the widget is created this way, the style from the upper widget is set unilaterally + ov = New(tw, bwStyled, gowid.VAlignTop{}, gowid.RenderFixed{}, gowid.HAlignLeft{}, gowid.RenderFixed{}, + Options{ + IgnoreLowerStyle: true, + }) + c = ov.Render(gowid.RenderFlowWith{C: 6}, gowid.Focused, gwtest.D) + assert.Equal(t, "toptom", c.String()) + assert.Equal(t, tcell.AttrMask(0), c.CellAt(0, 0).Style().OnOff&tcell.AttrBold) +} From 06abc4f10c261ab0cdc07f15d0c22fb39b0b118f Mon Sep 17 00:00:00 2001 From: Graham Clark Date: Sun, 3 Jul 2022 14:17:50 -0400 Subject: [PATCH 6/7] Make dialog behave better when canvases have styles applied. This change sets up the overlays so that the style from the upper canvas is always used. This prevents bold characters from the lower canvas from "bleeding through" to the final result. --- widgets/dialog/dialog.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/widgets/dialog/dialog.go b/widgets/dialog/dialog.go index 64900a9..823cfa9 100644 --- a/widgets/dialog/dialog.go +++ b/widgets/dialog/dialog.go @@ -405,7 +405,9 @@ type IOpenExt interface { func OpenExt(w IOpenExt, container gowid.ISettableComposite, width gowid.IWidgetDimension, height gowid.IWidgetDimension, app gowid.IApp) { ov := overlay.New(w, container.SubWidget(), gowid.VAlignMiddle{}, height, // Intended to mean use as much vertical space as you need - gowid.HAlignMiddle{}, width) + gowid.HAlignMiddle{}, width, overlay.Options{ + IgnoreLowerStyle: true, + }) if _, ok := width.(gowid.IRenderFixed); ok { w.SetContentWidth(gowid.RenderFixed{}, app) // fixed or weight:1, ratio:0.5 From 35e5bf47e74b2019db3c10d9408a8fd80fa680fc Mon Sep 17 00:00:00 2001 From: Graham Clark Date: Sat, 9 Jul 2022 12:33:01 -0400 Subject: [PATCH 7/7] Tweak the way the terminal widget ends scrolling Thanks to @Peter2121 for this implementation! Prior to this change, if the user hit the terminal hot-key and scrolled back up then back down to the prompt again, a further keypress - q or Q - would still be required to end scroll-mode. This brings the terminal widget more in-line with other terminal implementations in that scroll-mode is now ended automatically if the user scrolls back to the prompt; no extra keypress needed by default. I have added a new option to the terminal Options struct to preserve the legacy behavior, if you need it - KeyPressToEndScrollMode (default false). --- widgets/terminal/terminal.go | 33 ++++++++++++++++++++++----------- 1 file changed, 22 insertions(+), 11 deletions(-) diff --git a/widgets/terminal/terminal.go b/widgets/terminal/terminal.go index 3378540..bb970ae 100644 --- a/widgets/terminal/terminal.go +++ b/widgets/terminal/terminal.go @@ -129,14 +129,16 @@ type title struct{} type hotkey struct{} type Options struct { - Command []string - Env []string - HotKey IHotKeyProvider - HotKeyPersistence IHotKeyPersistence // the period of time a hotKey sticks after the first post-hotKey keypress - Scrollback int - Scrollbar bool // disabled regardless of setting if there is no scrollback - HotKeyFns []HotKeyInputFn // allow custom behavior after pressing the hotkey - EnableBracketedPaste bool + Command []string + Env []string + HotKey IHotKeyProvider + HotKeyPersistence IHotKeyPersistence // the period of time a hotKey sticks after the first post-hotKey keypress + Scrollback int + Scrollbar bool // disabled regardless of setting if there is no scrollback + HotKeyFns []HotKeyInputFn // allow custom behavior after pressing the hotkey + EnableBracketedPaste bool + KeyPressToEndScrollMode bool // set to true to enable legacy behavior - when the user has scrolled + // back to the prompt, still require a keypress (q or Q) to end scroll-mode. } // Widget is a widget that hosts a terminal-based application. The user provides the @@ -379,9 +381,18 @@ func (w *Widget) Scroll(dir ScrollDir, page bool, lines int) { } else { lines = w.canvas.ScrollBuffer(dir, false, gwutil.SomeInt(lines)) } - // Scrolling is now true if it (a) was previously, or (b) wasn't, but we - // scrolled more than one line - w.isScrolling = w.isScrolling || lines != 0 + + wasScrolling := w.isScrolling + if lines != 0 { + w.isScrolling = true + } else if !w.params.KeyPressToEndScrollMode && dir == ScrollDown { + // Disable scroll if we are at the bottom and we tried to scroll down + // Thanks @Peter2121 ! + w.isScrolling = false + } + if wasScrolling && !w.isScrolling { + w.ResetScroll() + } } func (w *Widget) ResetScroll() {