Sublime Forum

Open reference in active column

#1

With Sublime Text 3 object reference is opened in active tab. With the 4 version it is opened in same tab or new created tab. Maybe can I edit settings?

0 Likes

#2

Can you clarify the steps you’re taking that are resulting in it not doing what you expect? If I understand you correctly (and I may not be) it sounds like you’re trying to go to the reference of symbols, but I believe that should still work the same unless you explicitly press extra keys or click the icon that indicates you want a split view.

0 Likes

#3

Yeah, sorry I not specified and have mistakes with terms.
For example:

  1. I set layout with 2 columns (shift+alt+2),
  2. First column contains some interested code, second - plain,
  3. I activate second column: click by cursor,
  4. Move cursor to some method of the first column,
  5. Pop-up window show definition and reference of the method by a project.

And now the difference:

  • 3rd version: link - code with definition/reference is opened in active column - 2nd column.
  • 4th version: the link is opened in same column (new tab) or (optional) in a newly created column (automatically).

I like mechanism of 3rd version: the original code is not lost sight of.

0 Likes

#4

So I cannot fix it?

0 Likes

#5

I remember some changes being made in this area. If I remember correctly they were related to fixing problems with Sublime re-opening a second copy of a file when you look up a reference/definition in cases where the file was already open but in a different group.

Does this also happen in Safe Mode?

0 Likes

#6

Yes, it’s the same in safe mode

0 Likes

#7

I’m running into the same thing on build 4126. Your reference to:

… sounds exactly like my problem.

Here is a .gif showing exactly what I’m experiencing.

Peek%202022-07-13%2016-38

I would expect the active tab to just select the already open “delete_me.h” file that’s in the group view on the right. However neither a normal left click or ctrl+left click select it as expected.

Has there been any update to this @OdatNurd?

0 Likes

#8

I assume changing the value of the select_across_groups preference doesn’t help?

0 Likes

#9

Correct. I tried toggling the value for this setting as it seems related but it had no effect.

0 Likes

#10
0 Likes

#11

@kingkeith
Thanks for the reference!

Unfortunately the code has changed a bit since then so it wasn’t exactly clear how to implement that comment’s proposed changes. I wasn’t trying to spend a lot of time on this so I just blindly removed all references of sublime.FORCE_GROUP from both Default/symbol.py and Default/switch_file.py and that seems to work:

Peek%202022-07-14%2013-07

Just my 2 cents, but given all the discussion around this it seems like it should exist as a setting.

0 Likes

#12

It is/was an issue in ST3 too, I posted about it 3 months ago and it’s comes up every now and then. Any road glad you’ve got a solution, I’m sure I’m gonna bump into this if I can get ST(4) working…

0 Likes