Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: DraftingDreamer/ICSharpCode.TextEditor
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: master
Choose a base ref
...
head repository: gitextensions/ICSharpCode.TextEditor
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: master
Choose a head ref
Checking mergeability… Don’t worry, you can still create the pull request.
  • 2 commits
  • 3 files changed
  • 4 contributors

Commits on Aug 16, 2026

  1. fix(TextAreaControl): measure glyph width

    The horizontal scrollbar works in WideSpaceWidth units (the width of 'x'),
    but its extent was derived from GetVisualColumnFast, which counts characters
    and assumes every one of them is exactly one column wide.
    
    Any glyph wider than 'x' - CJK, emoji, glyphs coming from a fallback font, or
    any proportional font - therefore makes the scroll range shorter than the line
    actually painted. Depending on how far off it is, either the scrollbar is not
    shown at all, or its thumb cannot be dragged to the end of the line. Setting
    HScrollBar.Value from code (caret movement, selection drag) uses the accurate
    GetVisualColumn and can reach Maximum, so those paths scroll further right than
    the thumb allows - which is how the mismatch becomes visible to the user.
    
    Replace the character count with GetVisualWidthColumns, which measures the
    glyphs using the existing per-character width cache and mirrors the tab
    handling of PaintLinePart. The cached line widths now depend on the font, so
    they are invalidated on OptionsChanged.
    
    Refs: gitextensions#63
    DraftingDreamer authored Aug 16, 2026
    Configuration menu
    Copy the full SHA
    948ae7b View commit details
    Browse the repository at this point in the history

Commits on Sep 20, 2026

  1. fix(TextAreaControl): do not cache measuring DC

    A Graphics from Control.CreateGraphics() wraps a DC borrowed from the system
    cache and is bound to the control's current window handle. Keeping one for the
    lifetime of the control leaves a stale HDC behind once that handle goes away, so
    the next layout pass throws "Parameter is not valid" out of
    TextRenderer.MeasureText before it measures anything.
    
    Scope it to the layout pass instead, which is the pattern every other
    CreateGraphics() call in this library already uses. The ??= is kept, so a pass
    which only reads cached line widths still creates no device context at all.
    
    Refs: gitextensions#64
    Co-authored-by: Bhanu Santin <bsantin@hemlock.com>
    Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
    3 people authored Sep 20, 2026
    Configuration menu
    Copy the full SHA
    114f0c5 View commit details
    Browse the repository at this point in the history
Loading