mirror of
https://github.com/zyedidia/micro.git
synced 2026-03-10 06:40:24 +09:00
Don't display cursorline if there is a selection
This commit is contained in:
@@ -562,7 +562,7 @@ func (v *View) DisplayView() {
|
||||
lineStyle = highlightStyle
|
||||
}
|
||||
|
||||
if settings["cursorline"].(bool) && v.Cursor.Y == lineN+v.Topline {
|
||||
if settings["cursorline"].(bool) && !v.Cursor.HasSelection() && v.Cursor.Y == lineN+v.Topline {
|
||||
if style, ok := colorscheme["cursor-line"]; ok {
|
||||
fg, _, _ := style.Decompose()
|
||||
lineStyle = lineStyle.Background(fg)
|
||||
@@ -584,7 +584,7 @@ func (v *View) DisplayView() {
|
||||
lineIndentStyle = style
|
||||
}
|
||||
}
|
||||
if settings["cursorline"].(bool) && v.Cursor.Y == lineN+v.Topline {
|
||||
if settings["cursorline"].(bool) && !v.Cursor.HasSelection() && v.Cursor.Y == lineN+v.Topline {
|
||||
if style, ok := colorscheme["cursor-line"]; ok {
|
||||
fg, _, _ := style.Decompose()
|
||||
lineIndentStyle = lineIndentStyle.Background(fg)
|
||||
@@ -628,7 +628,7 @@ func (v *View) DisplayView() {
|
||||
|
||||
for i := 0; i < v.width-x; i++ {
|
||||
lineStyle := tcell.StyleDefault
|
||||
if settings["cursorline"].(bool) && v.Cursor.Y == lineN+v.Topline {
|
||||
if settings["cursorline"].(bool) && !v.Cursor.HasSelection() && v.Cursor.Y == lineN+v.Topline {
|
||||
if style, ok := colorscheme["cursor-line"]; ok {
|
||||
fg, _, _ := style.Decompose()
|
||||
lineStyle = lineStyle.Background(fg)
|
||||
|
||||
Reference in New Issue
Block a user