This is needed since there can now be an arbitrary number of widgets competing
for vertical space.
- Add a new MaxHeight method to the tk.Widget interface to provide hint on how
to distribute the height.
- Implement the algorithm in distributeHeight in cli/app.go.
The "-count" flag causes the test functions to be invoked multiple times. Since
some tests mutate their test data or some global state, they will fail when
invoked with a count larger than 1.
This commit changes *some* of such tests to either avoid mutating the test data,
or resetting the global state. Some such tests still remain and will be fixed later.
A new type, tk.Bindings is defined for bindings. It is always called with the
widget currently handling the event, in addition to the event being handled.
* Move all widget types to a new pkg/cli/tk.
* Move Mode{Line Prompt} to a new pkg/cli/mode.
* Move all packages in pkg/cli/addons to pkg/cli/mode.
* Remove WriteListing.
* Remove StdTTY.
* Rename GetCodeBuffer to CodeBuffer.