Skip to content

Commit

Permalink
Merge pull request #54 from blp1526/ctrl_a
Browse files Browse the repository at this point in the history
Add KeyCtrlA
  • Loading branch information
blp1526 authored Jan 20, 2018
2 parents 0f99351 + 9215d3a commit bbd6c74
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ $ isac
|C-u|power on current row's server|
|C-r|refresh rows|
|BackSpace, C-b, C-h|delete a filter character|
|C-a|delete all filter characters|
|C-s|sort rows|
|C-/|show help|
|Enter|show current row's detail|
Expand Down
8 changes: 8 additions & 0 deletions lib/isac.go
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,8 @@ MAINLOOP:
case termbox.KeyCtrlSlash:
i.state.Toggle("help")
i.draw("")
case termbox.KeyCtrlA:
i.removeRuneAllFromFilter()
case termbox.KeyBackspace2, termbox.KeyCtrlB, termbox.KeyCtrlH:
i.removeRuneFromFilter()
case termbox.KeyCtrlS:
Expand Down Expand Up @@ -150,6 +152,7 @@ func (i *Isac) draw(message string) {
"<C-u> power on current row's server",
"<C-r> refresh rows",
"<BackSpace>, C-b>, <C-h> delete a filter character",
"<C-a> delete all filter characters",
"<C-s> sort rows",
"<C-/> show help",
"<Enter> show current row's detail",
Expand Down Expand Up @@ -338,3 +341,8 @@ func (i *Isac) removeRuneFromFilter() {

i.draw("")
}

func (i *Isac) removeRuneAllFromFilter() {
i.filter = ""
i.draw("")
}

0 comments on commit bbd6c74

Please sign in to comment.