fix clipboard_linux.v

pull/3006/head
Alexander Medvednikov 2019-12-07 18:16:19 +03:00
parent e1ad1794e3
commit 7b0e378947
2 changed files with 45 additions and 15 deletions

View File

@ -300,6 +300,7 @@ fn (cb mut Clipboard) start_listener(){
} }
} }
C.PropertyNotify {} C.PropertyNotify {}
else {}
} }
} }
} }

View File

@ -190,21 +190,50 @@ fn (r Readline) analyse(c int) Action {
fn (r Readline) analyse_control() Action { fn (r Readline) analyse_control() Action {
c := r.read_char() c := r.read_char()
match c {
`[` { match c {
sequence := r.read_char() `[` {
match sequence { sequence := r.read_char()
`C` { return .move_cursor_right } match sequence {
`D` { return .move_cursor_left } `C` { return .move_cursor_right }
`B` { return .history_next } `D` { return .move_cursor_left }
`A` { return .history_previous } `B` { return .history_next }
`1` { return r.analyse_extended_control() } `A` { return .history_previous }
`2` { return r.analyse_extended_control_no_eat(sequence) } `1` { return r.analyse_extended_control() }
`3` { return r.analyse_extended_control_no_eat(sequence) } `2` { return r.analyse_extended_control_no_eat(sequence) }
else {} `3` { return r.analyse_extended_control_no_eat(sequence) }
} else {}
} }
} }
else { }
}
/*
//TODO
match c {
case `[`:
sequence := r.read_char()
match sequence {
case `C`: return .move_cursor_right
case `D`: return .move_cursor_left
case `B`: return .history_next
case `A`: return .history_previous
case `1`: return r.analyse_extended_control()
case `2`: return r.analyse_extended_control_no_eat(sequence)
case `3`: return r.analyse_extended_control_no_eat(sequence)
case `9`:
foo()
bar()
else:
}
else:
}
*/
return .nothing return .nothing
} }