a few miscellaneous fixes and improvements (#1105)

* add binding for more primitive backspace

* support selecting page up and page down

* fix matchbraceleft for braces that start on x=0

* fix multiline copy-paste indenting

let's say you have two lines like

  <space><space>line1
  <space><space>line2

so you start from cursor x=0 and select both lines, then paste.
we don't want any leading whitespace in this case, because the
cursor is already at x=0 and the selection already includes
whitespace.
This commit is contained in:
JT Olio
2018-05-12 19:31:57 -06:00
committed by Zachary Yedidia
parent 3c01947cb3
commit ae9bb763fb
5 changed files with 47 additions and 2 deletions

View File

@@ -76,8 +76,8 @@ func (c *CellView) Draw(buf *Buffer, top, height, left, width int) {
curX := buf.Cursor.X
curLoc := buf.Cursor.Loc
if buf.Settings["matchbraceleft"].(bool) {
curX--
if curX > 0 {
curX--
curLoc = curLoc.Move(-1, buf)
}
}