TurboPack / SynEdit

SynEdit is a syntax highlighting edit control, not based on the Windows common controls.
216 stars 72 forks source link

eoTrimtrailingSpaces vs Read only #244

Closed JaFi-cz closed 1 year ago

JaFi-cz commented 1 year ago

When you have editor in read only mode with enabled eoTrimTrailingSpaces and select text, it will mark editor as modified, even is in ReadOnly mode, cause change caret Y causes trim.

Synedit.pas, line 3504 (inside TCustomSynEdit.SetCaretXYEx procedure)

original code:

  //Trim here
  if (Value.Line <> fCaretY) and (eoTrimTrailingSpaces in fOptions) and

Fixed:

  //Trim here
  if not FReadOnly and (Value.Line <> fCaretY) and (eoTrimTrailingSpaces in fOptions) and
romankassebaum commented 1 year ago

I added your changeset.