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 = `
|
const HelpText = `
|
||||||
Keyboard commands for Textfile:
|
Keyboard commands for Twitter:
|
||||||
|
|
||||||
/: Show/hide this help window
|
/: Show/hide this help window
|
||||||
h: Previous Twitter name
|
h: Previous Twitter name
|
||||||
l: Next Twitter name
|
l: Next Twitter name
|
||||||
|
o: Open the Twitter handle in a browser
|
||||||
|
|
||||||
arrow left: Previous Twitter name
|
arrow left: Previous Twitter name
|
||||||
arrow right: Next Twitter name
|
arrow right: Next Twitter name
|
||||||
@ -156,7 +157,7 @@ func (widget *Widget) keyboardIntercept(event *tcell.EventKey) *tcell.EventKey {
|
|||||||
widget.Next()
|
widget.Next()
|
||||||
return nil
|
return nil
|
||||||
case "o":
|
case "o":
|
||||||
wtf.OpenFile(widget.CurrentSource())
|
wtf.OpenFile(widget.currentSourceURI())
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -171,3 +172,8 @@ func (widget *Widget) keyboardIntercept(event *tcell.EventKey) *tcell.EventKey {
|
|||||||
return event
|
return event
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (widget *Widget) currentSourceURI() string {
|
||||||
|
src := "https://twitter.com/" + widget.CurrentSource()
|
||||||
|
return src
|
||||||
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user