Must be one of those forgotten features.what Widget are you using ?
i suspect a hardcoded #13#10 instead of LineEnding. Not the Tmemo at fault.
Note: If WantReturns is false, users can still enter return characters into the text by pressing Ctrl+Enter.
The Enter key is normally used to press the default button in a form, so it cannot be used to add line breaks into the text by default. Set WantReturns to True to allow line breaks to be entered using Enter when the control has the input focus. Ctrl+Enter can be used to insert a line break, even if WantReturns is set to False.
Seems you need to handle CTRL+Enter by hands. It is not handled by native Memo code on Windows.
Isn't this just default behavoir?The WantReturns is only for the Enter.Even in Delphi this is the case.QuoteNote: If WantReturns is false, users can still enter return characters into the text by pressing Ctrl+Enter.https://docwiki.embarcadero.com/Libraries/Sydney/en/API:Vcl.StdCtrls.TMemo.WantReturnsO, and this is also documented for Lazarus:QuoteThe Enter key is normally used to press the default button in a form, so it cannot be used to add line breaks into the text by default. Set WantReturns to True to allow line breaks to be entered using Enter when the control has the input focus. Ctrl+Enter can be used to insert a line break, even if WantReturns is set to False.https://lazarus-ccr.sourceforge.io/docs/lcl/stdctrls/tcustommemo.wantreturns.html
Ctrl+Enter does NOT enter a new line in a TMemo control on Linux ONLY when WantReturns is FALSE.
Quote from: msintle on April 03, 2024, 02:33:14 pmCtrl+Enter does NOT enter a new line in a TMemo control on Linux ONLY when WantReturns is FALSE.Ha, then I misunderstood.Yes. It seems like the CTRL+Enter is also blocked when setting WantReturns to false.That's a bug.The weird part is... Alt+Enter does still work
Quote from: rvk on April 03, 2024, 03:30:52 pmThe weird part is... Alt+Enter does still work That is a brilliant workaround - thanks Edit - Spoke too soon Doesn't work on, for example, Kali 23 with Qt5 Lazarus!Any thoughts on what a proper fix for this problem would entail?
The weird part is... Alt+Enter does still work