Jump to content
RonaldK

Delphi 10.4.1 code navigation - Cursor is vanished

Recommended Posts

Updated to Delphi 10.4.1

When using the code navigation [STRG][Shift] Cursor up/down the cursor vanish and I cant see the text cursor.

Any settings needed?

 

Share this post


Link to post
20 minutes ago, Lars Fosdal said:

Is this to navigate between interface and implementation for a class method?

Yes. After any navigation the source code cursor isn't visible.

I can't see the actual line without the cursor. I have to press a cursor key to get it back.

Share this post


Link to post

I haven't seen that specific problem, but I have some units where Ctrl+Shift+Arrow up/down simply refuses to work in 10.4.1 as well as 10.3.3.

I need to try to make a minimal example and report it.

Share this post


Link to post

See comments #1
Ctrl+Shift+ArrowUp/Down does not work.
Seems to be due to typed constant.
 

See comments #2:
Broken class completion, seemingly due to same cause as #1.

 

    program SydneyCodeNav;

    {$APPTYPE CONSOLE}

    {$R *.res}

    uses
      System.SysUtils;

    type
      TRec = record
        a: Integer;
    //     procedure Test;  // #2 Uncomment line and press Ctrl+Shift+C to complete code
      end;

      TMyObject = class
      const
        TR:TRec = (a:1);
      private
        procedure InternalTest; // #1 Place cursor here, try Ctrl+Shift+ArrowDown does not work
      public
        procedure Test;
      end;

      TUnrelated = class
    //    procedure Unrelated; // #2 Uncomment line and press Ctrl+Shift+C to complete code
      end;

    { TMyObject }

    procedure TMyObject.InternalTest;
    begin
      Writeln('InternalTest'); // #1 Place cursor here, Ctrl+Shift+ArrowDown
    end;

    procedure TMyObject.Test;
    begin
      Writeln('Test'); // #1 Place cursor here, Ctrl+Shift+ArrowDown does not work
      InternalTest; // Ctrl-Clicking InternalTest works
    end;

    procedure Test;  // Chtrl+Shift+ArrowUp/Down works here
    var
      o: TMyObject;
    begin
      o := TMyObject.Create; // Chtrl+Shift+ArrowUp/Down works here
      try
        o.Test;
      finally
        o.Free;
      end;
    end;

    begin
      try
        try
          Test;
        except
          on E: Exception do
            Writeln(E.ClassName, ': ', E.Message);
        end;
      finally
        Write('Press Enter: ');
        Readln;
      end;
    end.

 

Share this post


Link to post

Seems to be another problem of general navigation.

In my case the navigation works but the cursor is not visible or painted.

 

After Crtl+Shift Up/down and navigate to the left or right, the cursor is painted twice:

image.png.2bf4579f0798bf6417609d72f75ee9bf.png

 

This does not happen in a new Windows application.

Maybe using some other units cause this. Try to find which unit it is.

 

I'm using DevExpress components, maybe not fully fixed:

https://supportcenter.devexpress.com/ticket/details/t897104/autocomplete-not-working-on-d10-4-after-add-tcxbutton-or-other-dx-component

https://quality.embarcadero.com/browse/RSP-29674

 

Ronald

 

 

 

Share this post


Link to post
5 minutes ago, RonaldK said:

In my case the navigation works but the cursor is not visible or painted.

Have you tested without extra IDE extensions?

Share this post


Link to post
8 minutes ago, Lars Fosdal said:

Have you tested without extra IDE extensions?

Yes. I'm using no IDE extensions.

Share this post


Link to post
On 9/9/2020 at 9:51 AM, Lars Fosdal said:

Seems to be due to typed constant.

 

I have another one (more exotic) example:

unit Unit1;

interface

type
  TFoo = record
    X: set of (s1, s2, s3);
    Y: record
         Z: (e1, e2, e3);
       end;
  end;

  TBar = class
  private
    procedure P; // Ctrl+Shift+C does not work!
  end;

implementation

end.

 

Edited by balabuev

Share this post


Link to post

I think code completion in 10.4.1 is still using the old parser, hence it still misbehaves around certain constructs.
@balabuev You should add your example to one of the existing code completion issues in QP - or register a new issue.

Share this post


Link to post
20 minutes ago, Lars Fosdal said:

I think code completion in 10.4.1 is still using the old parser, hence it still misbehaves around certain constructs.

Agree, and I've added a comment to QP. But, my point is that code constructs, I've shown, are veeeery old too.

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×