mirror of
https://github.com/gui-cs/Terminal.Gui.git
synced 2026-01-01 16:59:35 +01:00
Fix horizontal scrolling in the ListView.
This commit is contained in:
@@ -912,7 +912,7 @@ public class ListWrapper : IListDataSource
|
||||
int start = 0
|
||||
)
|
||||
{
|
||||
container.Move (col, line);
|
||||
container.Move (Math.Max (col - start, 0), line);
|
||||
object t = _source? [item];
|
||||
|
||||
if (t is null)
|
||||
@@ -1028,7 +1028,8 @@ public class ListWrapper : IListDataSource
|
||||
|
||||
private void RenderUstr (ConsoleDriver driver, string ustr, int col, int line, int width, int start = 0)
|
||||
{
|
||||
string u = TextFormatter.ClipAndJustify (ustr, width, TextAlignment.Left);
|
||||
string str = start > ustr.GetColumns () ? string.Empty : ustr.Substring (Math.Min (start, ustr.ToRunes ().Length - 1));
|
||||
string u = TextFormatter.ClipAndJustify (str, width, TextAlignment.Left);
|
||||
driver.AddStr (u);
|
||||
width -= u.GetColumns ();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user