mirror of
https://github.com/zyedidia/micro.git
synced 2026-03-29 22:27:13 +09:00
Include newlines in selection
This commit is contained in:
12
src/view.go
12
src/view.go
@@ -424,6 +424,18 @@ func (v *View) Display() {
|
||||
charNum++
|
||||
x++
|
||||
}
|
||||
if v.cursor.HasSelection() &&
|
||||
(charNum >= v.cursor.selectionStart && charNum <= v.cursor.selectionEnd ||
|
||||
charNum <= v.cursor.selectionStart && charNum >= v.cursor.selectionEnd) {
|
||||
|
||||
selectStyle := tcell.StyleDefault.Reverse(true)
|
||||
|
||||
if _, ok := colorscheme["selection"]; ok {
|
||||
selectStyle = colorscheme["selection"]
|
||||
}
|
||||
v.s.SetContent(x+tabchars, lineN, ' ', nil, selectStyle)
|
||||
}
|
||||
|
||||
x = 0
|
||||
st, ok := v.matches[charNum]
|
||||
if ok {
|
||||
|
||||
Reference in New Issue
Block a user