mirror of
https://github.com/fadden/6502bench.git
synced 2026-04-27 03:17:45 +00:00
Improve save & restore of top line
Whenever the display list gets regenerated, we need to restore the code list view scroll position to the previous location in the file. This gets tricky when multiple lines are appearing or disappearing. We were saving the file offset of the line, but that works poorly when there's a multi-line comment associated with that offset, because we end up scrolling to the top of the comment whenever any part of the comment is at the top of the screen. We now track the file offset and the number of lines we were from the top of that offset's content. This works well unless we remove a lot of lines. If the adjusted line index would put us into a different file offset, we punt and just scroll to the top of the item. Also, fix a crasher in Edit Note. Also, fix behavior when the list shrinks while a line near the end of the file is selected. Also, change a few instances of "Color.FromArgb(0,0,0,0)" to use a common constant.
This commit is contained in:
1 parent
0ff2ebefdf
commit
a0dca6a5be
11 files changed
+80
-24
No files matched your search
@@ -24,6 +24,8 @@ namespace CommonWPF {
|
||||
/// Miscellaneous helper functions.
|
||||
/// </summary>
|
||||
public static class Helper {
|
||||
public static Color ZeroColor = Color.FromArgb(0, 0, 0, 0);
|
||||
|
||||
/// <summary>
|
||||
/// Measures the size of a string when rendered with the specified parameters. Uses
|
||||
/// the current culture, left-to-right flow, and 1 pixel per DIP.
|
||||
|
||||
Reference in new issue
Block a user