mirror of
https://github.com/zyedidia/micro.git
synced 2026-03-29 22:27:13 +09:00
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:
@@ -198,7 +198,10 @@ func (v *View) ToggleTabbar() {
|
||||
}
|
||||
|
||||
func (v *View) paste(clip string) {
|
||||
leadingWS := GetLeadingWhitespace(v.Buf.Line(v.Cursor.Y))
|
||||
leadingWS := ""
|
||||
if v.Cursor.X > 0 {
|
||||
leadingWS = GetLeadingWhitespace(v.Buf.Line(v.Cursor.Y))
|
||||
}
|
||||
|
||||
if v.Cursor.HasSelection() {
|
||||
v.Cursor.DeleteSelection()
|
||||
|
||||
Reference in New Issue
Block a user