mirror of
https://github.com/Gu1llaum-3/sshm.git
synced 2026-01-27 03:04:21 +01:00
fix: use line numbers to prevent deleting all duplicate SSH hosts when removing one
This commit is contained in:
@@ -144,7 +144,11 @@ func (m Model) renderListView() string {
|
||||
func (m Model) renderDeleteConfirmation() string {
|
||||
// Remove emojis (uncertain width depending on terminal) to stabilize the frame
|
||||
title := "DELETE SSH HOST"
|
||||
question := fmt.Sprintf("Are you sure you want to delete host '%s'?", m.deleteHost)
|
||||
hostName := ""
|
||||
if m.deleteHost != nil {
|
||||
hostName = m.deleteHost.Name
|
||||
}
|
||||
question := fmt.Sprintf("Are you sure you want to delete host '%s'?", hostName)
|
||||
action := "This action cannot be undone."
|
||||
help := "Enter: confirm • Esc: cancel"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user