mirror of
https://github.com/zyedidia/micro.git
synced 2026-03-30 06:37:14 +09:00
Fix problem with horizontal scrolling
This commit is contained in:
@@ -734,7 +734,7 @@ func (v *View) DisplayView() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if tabs[curTab].curView == v.Num && !v.Cursor.HasSelection() && v.Cursor.Y == curLineN && colN == v.Cursor.X {
|
if tabs[curTab].curView == v.Num && !v.Cursor.HasSelection() && v.Cursor.Y == curLineN && colN == v.Cursor.X {
|
||||||
v.DisplayCursor(screenX, screenY)
|
v.DisplayCursor(screenX-v.leftCol, screenY)
|
||||||
}
|
}
|
||||||
|
|
||||||
lineStyle := defStyle
|
lineStyle := defStyle
|
||||||
@@ -828,7 +828,7 @@ func (v *View) DisplayView() {
|
|||||||
// Here we are at a newline
|
// Here we are at a newline
|
||||||
|
|
||||||
if tabs[curTab].curView == v.Num && !v.Cursor.HasSelection() && v.Cursor.Y == curLineN && colN == v.Cursor.X {
|
if tabs[curTab].curView == v.Num && !v.Cursor.HasSelection() && v.Cursor.Y == curLineN && colN == v.Cursor.X {
|
||||||
v.DisplayCursor(screenX, screenY)
|
v.DisplayCursor(screenX-v.leftCol, screenY)
|
||||||
}
|
}
|
||||||
|
|
||||||
// The newline may be selected, in which case we should draw the selection style
|
// The newline may be selected, in which case we should draw the selection style
|
||||||
|
|||||||
Reference in New Issue
Block a user