Recent

Author Topic: Tab deletes selection  (Read 3232 times)

dbannon

  • Hero Member
  • *****
  • Posts: 1542
    • tomboy-ng, a rewrite of the classic Tomboy
Tab deletes selection
« on: July 03, 2021, 07:14:19 am »
Seems every time I download trunk indenting in the Lazarus-IDE has changed. But as I understand trunk is development and everyone want indent to work differently so I bit my tongue and wait for next time.

But the recent change is pretty close to unacceptable !  In the past, selecting a block and pressing Tab would indent that block by one Tab, 8 spaces or (my setting, sometimes works) 4 spaces.   But now, for a week at least, it deletes the block (and presumably replaces it with an unseen tab).

Now, I am asking here if this is some policy change rather than a regression ?  The model of tab increasing indent (and conversely, shift tab reducing it) is a major aspect of a source code editor ?

Is this change deliberate ?

Davo
Lazarus 2, Linux (and reluctantly Win10, OSX)
My Project - https://github.com/tomboy-notes/tomboy-ng

wp

  • Hero Member
  • *****
  • Posts: 8788
Re: Tab deletes selection
« Reply #1 on: July 03, 2021, 11:16:01 am »
There a lots of settings. Are you sure that they are not changed?

In "IDE Options" > "Editor" > "General" > "Tab and Ident" there is a checkbox "Tab indents blocks". It is checked in all my installations (and I never change this settings), but when this is OFF the behaviour described by you is observed.
Mainly Lazarus trunk / fpc 3.2.0 / all 32-bit on Win-10, but many more...

Martin_fr

  • Administrator
  • Hero Member
  • *
  • Posts: 7415
  • Debugger - SynEdit - and more
    • wiki
Re: Tab deletes selection
« Reply #2 on: July 03, 2021, 11:32:17 am »
I am not aware of an intentional change like that.

But, are your setting still intact?
I am not sure what the default behaviour is (though again, not aware the defaults changed).

You may want to disable "smart indent" (link to codetool settings).
It should not have changed, but if codetool changed.... Still it should indent, not overwrite.

Quote
(my setting, sometimes works)
It should always. But disable "smart indent

dbannon

  • Hero Member
  • *****
  • Posts: 1542
    • tomboy-ng, a rewrite of the classic Tomboy
Re: Tab deletes selection
« Reply #3 on: July 04, 2021, 02:03:14 am »
> there is a checkbox "Tab indents blocks".

Oh, that is embarrassing !  I would have sworn I checked that setting before and after the rebuild I just did but apparently I did not. I was searching through the other, more distant settings in case there was one I missed. Sigh .....

Anyway, yep, tab now indents, thanks !

And I have my 4 spaces indent back too.

Sorry to waste your time !

Davo
Lazarus 2, Linux (and reluctantly Win10, OSX)
My Project - https://github.com/tomboy-notes/tomboy-ng

 

TinyPortal © 2005-2018