mirror of
https://github.com/felixangell/phi.git
synced 2024-08-16 19:20:21 +03:00
fixed right key going to a negative offset at the end of a line
This commit is contained in:
parent
5d9f658678
commit
a20070c4a5
@ -551,8 +551,8 @@ func (b *Buffer) moveRight() {
|
||||
if b.curs.x >= currLineLength && b.curs.y < len(b.contents)-1 {
|
||||
// we're at the end of the line and we have
|
||||
// some lines after, let's wrap around
|
||||
b.moveDown()
|
||||
b.curs.move(-currLineLength, 0)
|
||||
b.moveDown()
|
||||
} else if b.curs.x < b.contents[b.curs.y].Len() {
|
||||
// we have characters to the right, let's move along
|
||||
b.curs.move(1, 0)
|
||||
|
@ -1,12 +1,13 @@
|
||||
package gui
|
||||
|
||||
import (
|
||||
"log"
|
||||
"strings"
|
||||
|
||||
"github.com/felixangell/fuzzysearch/fuzzy"
|
||||
"github.com/felixangell/phi/cfg"
|
||||
"github.com/felixangell/strife"
|
||||
"github.com/veandco/go-sdl2/sdl"
|
||||
"log"
|
||||
"strings"
|
||||
)
|
||||
|
||||
var commandSet []string
|
||||
|
Loading…
Reference in New Issue
Block a user