mirror of
https://github.com/taigrr/wtf
synced 2025-01-18 04:03:14 -08:00
Fix a number of minor bugs in the Twitter module
This commit is contained in:
parent
3958177a8e
commit
7e3a8fdcd6
@ -12,11 +12,12 @@ import (
|
||||
)
|
||||
|
||||
const HelpText = `
|
||||
Keyboard commands for Textfile:
|
||||
Keyboard commands for Twitter:
|
||||
|
||||
/: Show/hide this help window
|
||||
h: Previous Twitter name
|
||||
l: Next Twitter name
|
||||
o: Open the Twitter handle in a browser
|
||||
|
||||
arrow left: Previous Twitter name
|
||||
arrow right: Next Twitter name
|
||||
@ -156,7 +157,7 @@ func (widget *Widget) keyboardIntercept(event *tcell.EventKey) *tcell.EventKey {
|
||||
widget.Next()
|
||||
return nil
|
||||
case "o":
|
||||
wtf.OpenFile(widget.CurrentSource())
|
||||
wtf.OpenFile(widget.currentSourceURI())
|
||||
return nil
|
||||
}
|
||||
|
||||
@ -171,3 +172,8 @@ func (widget *Widget) keyboardIntercept(event *tcell.EventKey) *tcell.EventKey {
|
||||
return event
|
||||
}
|
||||
}
|
||||
|
||||
func (widget *Widget) currentSourceURI() string {
|
||||
src := "https://twitter.com/" + widget.CurrentSource()
|
||||
return src
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user