Recent

Author Topic: Spaces at end of line  (Read 3643 times)

BubikolRamios

  • Sr. Member
  • ****
  • Posts: 307
Spaces at end of line
« on: August 04, 2022, 11:05:56 pm »
say I have 'ab' and then typing n spaces after that, ENTER
'c'

Twice left arrow and it jumps to 'ab'. Like spaces are gone ?
lazarus 3.2-fpc-3.2.2-win32/win64

HeavyUser

  • Sr. Member
  • ****
  • Posts: 397
Re: Spaces at end of line
« Reply #1 on: August 04, 2022, 11:23:49 pm »
ctrl key is stack.

lainz

  • Hero Member
  • *****
  • Posts: 4619
  • Web, Desktop & Android developer
    • https://lainz.github.io/
Re: Spaces at end of line
« Reply #2 on: August 04, 2022, 11:31:10 pm »
say I have 'ab' and then typing n spaces after that, ENTER
'c'

Twice left arrow and it jumps to 'ab'. Like spaces are gone ?

It works like that on purpose. Spaces at the end of line are useless.

Zoran

  • Hero Member
  • *****
  • Posts: 1882
    • http://wiki.lazarus.freepascal.org/User:Zoran
Re: Spaces at end of line
« Reply #3 on: August 05, 2022, 12:41:19 am »

It works like that on purpose. Spaces at the end of line are useless.

This feature can be turned off (see the attached picture).


Martin_fr

  • Administrator
  • Hero Member
  • *
  • Posts: 10553
  • Debugger - SynEdit - and more
    • wiki

BubikolRamios

  • Sr. Member
  • ****
  • Posts: 307
Re: Spaces at end of line
« Reply #5 on: August 05, 2022, 07:15:18 am »
And in case one would want to  not trim trailing spacees in SynEdit ? Can't find prop.

Looks strange, user can see how caret goes to right,
TRegExp match (check on every synedit chage) does not see extra spaces. 

Until some other char is typed, then spaces in match miraculously appears.
« Last Edit: August 05, 2022, 07:33:17 am by BubikolRamios »
lazarus 3.2-fpc-3.2.2-win32/win64

HeavyUser

  • Sr. Member
  • ****
  • Posts: 397
Re: Spaces at end of line
« Reply #6 on: August 05, 2022, 08:15:48 am »
And in case one would want to  not trim trailing spacees in SynEdit ? Can't find prop.
see options->eoTrimTrailingSpaces

BubikolRamios

  • Sr. Member
  • ****
  • Posts: 307
Re: Spaces at end of line
« Reply #7 on: August 05, 2022, 08:21:00 am »
Thanks.
lazarus 3.2-fpc-3.2.2-win32/win64

Martin_fr

  • Administrator
  • Hero Member
  • *
  • Posts: 10553
  • Debugger - SynEdit - and more
    • wiki
Re: Spaces at end of line
« Reply #8 on: August 05, 2022, 11:37:29 am »
Looks strange, user can see how caret goes to right,
TRegExp match (check on every synedit chage) does not see extra spaces. 

Until some other char is typed, then spaces in match miraculously appears.

Yes, trailing spaces are virtual. They aren't part of TSynEdit.Lines, until something is typed after them.

Thaddy

  • Hero Member
  • *****
  • Posts: 16198
  • Censorship about opinions does not belong here.
Re: Spaces at end of line
« Reply #9 on: August 05, 2022, 06:37:52 pm »
#0 vs #32
Nough said.
If I smell bad code it usually is bad code and that includes my own code.

BubikolRamios

  • Sr. Member
  • ****
  • Posts: 307
Re: Spaces at end of line
« Reply #10 on: August 05, 2022, 09:50:11 pm »
another thing, having eoTrimTrailingSpaces off

Code: Pascal  [Select][+][-]
  1. 'aaaaaa           '
pres backspace at end of that, goes one space back
Code: Pascal  [Select][+][-]
  1. '           aaaaaa'
presing backspace before first a, it deletes all spaces.

Is that OK ?
lazarus 3.2-fpc-3.2.2-win32/win64

 

TinyPortal © 2005-2018