mirror of
https://github.com/veeso/termscp.git
synced 2026-09-26 14:01:17 -07:00
Fixed duplicated bookmarks after overwrite
This commit is contained in:
@@ -29,6 +29,7 @@ Released on FIXME: date
|
|||||||
- SCP file transfer: prevent infinite loops while performing `stat` on symbolic links pointing to themselves (e.g. `mylink -> mylink`)
|
- SCP file transfer: prevent infinite loops while performing `stat` on symbolic links pointing to themselves (e.g. `mylink -> mylink`)
|
||||||
- Fixed a bug causing termscp to crash if removing a bookmark
|
- Fixed a bug causing termscp to crash if removing a bookmark
|
||||||
- Fixed file format cursor position in the GUI
|
- Fixed file format cursor position in the GUI
|
||||||
|
- Fixed a bug causing termscp to show two equal bookmarks when overwriting one.
|
||||||
- Dependencies:
|
- Dependencies:
|
||||||
- Removed `unicode-width`
|
- Removed `unicode-width`
|
||||||
- For developers:
|
- For developers:
|
||||||
|
|||||||
@@ -94,6 +94,8 @@ impl AuthActivity {
|
|||||||
bookmarks_cli.add_bookmark(name.clone(), address, port, protocol, username, password);
|
bookmarks_cli.add_bookmark(name.clone(), address, port, protocol, username, password);
|
||||||
// Save bookmarks
|
// Save bookmarks
|
||||||
self.write_bookmarks();
|
self.write_bookmarks();
|
||||||
|
// Remove `name` from bookmarks if exists
|
||||||
|
self.bookmarks_list.retain(|b| b.as_str() != name.as_str());
|
||||||
// Push bookmark to list and sort
|
// Push bookmark to list and sort
|
||||||
self.bookmarks_list.push(name);
|
self.bookmarks_list.push(name);
|
||||||
self.sort_bookmarks();
|
self.sort_bookmarks();
|
||||||
|
|||||||
Reference in New Issue
Block a user