This fixes two crashes that can occur with empty record lists. One is when the
remove key is pressed, and the other is if the view is re-rendered.
Signed-off-by: brian m. carlson <sandals@crustytoothpaste.net>
Since the remove key now toggles whether the record is deleted, the name of the
function should reflect that.
Signed-off-by: brian m. carlson <sandals@crustytoothpaste.net>
This fixes re-rendering of the record list when using Browse Databases; the text
is no longer incorrectly formatted after entering and leaving a record.
Signed-off-by: brian m. carlson <sandals@crustytoothpaste.net>
This changes existing code to use the _render_records function, which handles
highlighting appropriately.
Signed-off-by: brian m. carlson <sandals@crustytoothpaste.net>
Urwid does not correctly signal the difference between Shift-Ctrl-B and Ctrl-B
(it reports them all as Ctrl-B), so a different key combination must be used.
Signed-off-by: brian m. carlson <sandals@crustytoothpaste.net>
This commit fixes a regression where the Enter key was not inserting a newline
in text boxes.
Signed-off-by: brian m. carlson <sandals@crustytoothpaste.net>
We used to attempt to remove deleted records from the listing as soon as we
deleted them. This caused all sorts of rendering bugs (usually involving not
removing the record from the list) which in turn led to users retrying the
operation, which led to them unintentionally deleting multiple records.
Now the deleted records are marked by a color change and are removed from the
database automatically when it is written to disk.
Signed-off-by: brian m. carlson <sandals@crustytoothpaste.net>
This is really broken at the moment, to the extent it can delete the wrong item,
so disable it until it's fixed.
Signed-off-by: brian m. carlson <sandals@crustytoothpaste.net>
This fixes a bug where when the user selects a record to view from the search
results and then goes back to the search results, the search result list was
rendered with equal-width columns instead of automatically-adjusted columns.
Signed-off-by: brian m. carlson <sandals@crustytoothpaste.net>
Previously, we had two different code paths for rendering records that were
search results. This unifies them by converting one representation of selected
items into another representation of selected items and calling one function
that uses the latter.
Signed-off-by: brian m. carlson <sandals@crustytoothpaste.net>
This commit fixes an inverted test that resulted in up and down being treated
like select or next.
Signed-off-by: brian m. carlson <sandals@crustytoothpaste.net>