Recent

Author Topic: Focus rect on breakpoint line.  (Read 334 times)

440bx

  • Hero Member
  • *****
  • Posts: 5456
Focus rect on breakpoint line.
« on: June 03, 2025, 06:33:30 pm »
Hello,

When the caret is on a line that has a breakpoint on it, the focus rectangle is not drawn. 

Should this be considered a bug ?

The first part of the attachment shows the caret on a line that has a breakpoint set on it and there is no focus rectangle.  The second part shows the caret on the following line (which has no breakpoint set on it) and the focus rectangle is drawn/visible as expected.

Comments welcome.
(FPC v3.0.4 and Lazarus 1.8.2) or (FPC v3.2.2 and Lazarus v4.0rc3) on Windows 7 SP1 64bit.

Martin_fr

  • Administrator
  • Hero Member
  • *
  • Posts: 11334
  • Debugger - SynEdit - and more
    • wiki
Re: Focus rect on breakpoint line.
« Reply #1 on: June 03, 2025, 08:04:01 pm »
What is a "focus rectangle"? The source editor does not have that. At least not by that name...
I can only assume you mean the "current line highlight", and you have set that to a dotted frame?

Yes, there are both "special line highlights". The editor currently applies only one line highlight (and the order which is chosen is hardcoded: error, gutter marks, current line.

Please add a feature request.

440bx

  • Hero Member
  • *****
  • Posts: 5456
Re: Focus rect on breakpoint line.
« Reply #2 on: June 03, 2025, 08:11:59 pm »
What is a "focus rectangle"? The source editor does not have that. At least not by that name...
I can only assume you mean the "current line highlight", and you have set that to a dotted frame?
Yes, that dotted frame is called the focus rectangle in the Windows API which is why I referred to it that way (that's what I'm used to.)

Yes, there are both "special line highlights". The editor currently applies only one line highlight (and the order which is chosen is hardcoded: error, gutter marks, current line.

Please add a feature request.
I'll add a feature request but, there is one thing I don't see... what other "highlight" is applied to the breakpoint line when editing ?


ETA:

added feature request:
https://gitlab.com/freepascal.org/lazarus/lazarus/-/issues/41691
ticket: 41691

« Last Edit: June 03, 2025, 08:17:26 pm by 440bx »
(FPC v3.0.4 and Lazarus 1.8.2) or (FPC v3.2.2 and Lazarus v4.0rc3) on Windows 7 SP1 64bit.

Martin_fr

  • Administrator
  • Hero Member
  • *
  • Posts: 11334
  • Debugger - SynEdit - and more
    • wiki
Re: Focus rect on breakpoint line.
« Reply #3 on: June 03, 2025, 08:39:58 pm »
The highlight for "active breakpoint" or whatever other state the breakpoint has.

I haven't tested, possible that it takes priority, even if it has  no color. That part still contains some very old code (been move around a bit, but still old...)

Martin_fr

  • Administrator
  • Hero Member
  • *
  • Posts: 11334
  • Debugger - SynEdit - and more
    • wiki
Re: Focus rect on breakpoint line.
« Reply #4 on: June 03, 2025, 08:43:47 pm »
I know the term focus rect.

I have however only seen it with edits, when applied to the entire edit (not some part, not some line => because the entire edit has the focus).

And with lists and grids, where focus is used for a single line or cell.

After all, why in an editor should the focus be limited to the line, when it could be on the word or on the char?

 

TinyPortal © 2005-2018