mirror of
https://github.com/felixangell/phi.git
synced 2024-08-16 19:20:21 +03:00
implemented delete key
This commit is contained in:
parent
cecb529cc4
commit
f4e6cb3d87
@ -202,6 +202,11 @@ func remove(slice []*rope.Rope, s int) []*rope.Rope {
|
||||
return append(slice[:s], slice[s+1:]...)
|
||||
}
|
||||
|
||||
func (b *Buffer) deleteNext() {
|
||||
b.moveRight()
|
||||
b.deletePrev()
|
||||
}
|
||||
|
||||
func (b *Buffer) deletePrev() {
|
||||
if b.curs.x > 0 {
|
||||
offs := -1
|
||||
@ -466,6 +471,10 @@ func (b *Buffer) processActionKey(key int) bool {
|
||||
}
|
||||
return true
|
||||
|
||||
case sdl.K_DELETE:
|
||||
b.deleteNext()
|
||||
return true
|
||||
|
||||
case sdl.K_LGUI:
|
||||
fallthrough
|
||||
case sdl.K_RGUI:
|
||||
|
Loading…
Reference in New Issue
Block a user