mirror of
https://github.com/zyedidia/micro.git
synced 2026-03-16 05:47:06 +09:00
Correct infobar and statusline options
This commit is contained in:
@@ -57,35 +57,6 @@ func (i *InfoWindow) SetBuffer(b *buffer.Buffer) {
|
||||
i.InfoBuf.Buffer = b
|
||||
}
|
||||
|
||||
// func (i *InfoWindow) YesNoPrompt() (bool, bool) {
|
||||
// for {
|
||||
// i.Clear()
|
||||
// i.Display()
|
||||
// screen.Screen.ShowCursor(utf8.RuneCountInString(i.Msg), i.y)
|
||||
// screen.Show()
|
||||
// event := <-events
|
||||
//
|
||||
// switch e := event.(type) {
|
||||
// case *tcell.EventKey:
|
||||
// switch e.Key() {
|
||||
// case tcell.KeyRune:
|
||||
// if e.Rune() == 'y' || e.Rune() == 'Y' {
|
||||
// i.HasPrompt = false
|
||||
// return true, false
|
||||
// } else if e.Rune() == 'n' || e.Rune() == 'N' {
|
||||
// i.HasPrompt = false
|
||||
// return false, false
|
||||
// }
|
||||
// case tcell.KeyCtrlC, tcell.KeyCtrlQ, tcell.KeyEscape:
|
||||
// i.Clear()
|
||||
// i.Reset()
|
||||
// i.HasPrompt = false
|
||||
// return false, true
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
|
||||
func (i *InfoWindow) Relocate() bool { return false }
|
||||
func (i *InfoWindow) GetView() *View { return i.View }
|
||||
func (i *InfoWindow) SetView(v *View) {}
|
||||
@@ -184,6 +155,7 @@ func (i *InfoWindow) Display() {
|
||||
if !i.HasPrompt && !i.HasMessage && !i.HasError {
|
||||
return
|
||||
}
|
||||
i.Clear()
|
||||
style := i.defStyle
|
||||
|
||||
if i.HasError {
|
||||
|
||||
Reference in New Issue
Block a user