Community
    • Login

    Tabs always open on the right?

    Scheduled Pinned Locked Moved Help wanted · · · – – – · · ·
    29 Posts 4 Posters 4.1k Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • appyfaceA
      appyface @PeterJones
      last edited by

      @PeterJones thank you for your assistance.

      If I have a running instance of Notepad++ and open one or more files from Windows Explorer by hitting ENTER or RClick > Open or RClick > Open with Notepad++, all those files open to the right of the active file.

      This happens for me whether Notepad++ is launched, or not. I’d like new tabs to always open to the far right regardless of active file tab, e.g. “on the end”.

      Do you have any plugins that might be changing the tab order? (? menu, Debug Info and pasting will give us your list of plugins)

      I don’t think so, but list is below.

      Do you have Settings > Preferences > General > Tab Bar: ☐ Multi-line enabled? Because if that’s on, if you have a lot of tabs, they will wrap around to a second (or more) row.

      No it is not enabled. I do have a lot of tabs but they are all on the same row.

      Maybe I’ve misunderstood what you’re asking, but no matter what I do, I cannot get it to open a tab truly to the left of the active tab.

      Mine are not opening to the left of the active tab. All but one file is opening to the extreme left, e.g. they are now the first tabs. Only one is opening to the extreme far right as I wish for.

      Debug Info:
      Notepad++ v7.8.9 (64-bit)
      Build time : Jul 15 2020 - 20:31:49
      Path : C:\program_files_NOINST\npp_x64\notepad++.exe
      Admin mode : ON
      Local Conf mode : ON
      OS Name : Windows 10 Enterprise (64-bit)
      OS Version : 1909
      OS Build : 18363.1016
      Current ANSI codepage : 1252
      Plugins : CodeAlignmentNpp.dll ComparePlugin.dll CsvQuery.dll ElasticTabstops.dll HTMLTag.dll mimeTools.dll NppConverter.dll NppExport.dll XMLTools.dll

      Some screenshots to help clarify…

      1. I’ve highlighted files in explorer.

      134ff3eb-946f-4698-b867-59b27b6c4011-image.png

      1. I hit ENTER. One file opens to extreme far right as I wish for:

      a7599606-8ed0-4723-80df-3da4f69fe1bb-image.png

      1. The remaining files open to extreme far left as the new first tabs:

      a0046272-271c-4bc8-8924-630e90103162-image.png

      Something I just thought about… ALL of my tabs are auto-restored by Notepad++ but have never been saved to any files, when I open these actual disk files from explorer. Because there is no active “file”, could that be the difference? Please try that and see if you can reproduce?

      Thank you. Kind regards.

      PeterJonesP 1 Reply Last reply Reply Quote 1
      • Alan KilbornA
        Alan Kilborn @PeterJones
        last edited by

        @PeterJones said in Tabs always open on the right?:

        Sorry, I could not reproduce your problem.
        If I have a running instance of Notepad++ and open one or more files from Windows Explorer by hitting ENTER or RClick > Open or RClick > Open with Notepad++, all those files open to the right of the active file.

        I could not reproduce this problem either.

        However… Peter said (repeated for emphasis):

        …files open to the right of the active file

        For me, any files that I open into a running Notepad++ instance using Explorer shell running, I get them open as the far rightmost tabs.

        Maybe this is what Peter meant? And he just had the already-existing rightmost tab active when trying this experiment?

        1 Reply Last reply Reply Quote 1
        • PeterJonesP
          PeterJones @appyface
          last edited by

          @appyface ,

          Sorry, I still cannot reproduce your problem. I closed all my normal files. I created 26 new files, each unsaved with at least one edit per “file”. I activated the first (far left) file “new 1”. I selected three files from Windows Explorer, and hit ENTER. They opened as entries #27-29 on the far right of the tabbar.

          by saying,

          I cannot get it to open a tab truly to the left of the active tab.

          I meant to say anywhere to the left of the active tab, not just immediately to the left of the active tab, so I was including the far left. They don’t open there. They open on the far right.

          I only said “to the right of the active tab” originally because my active tab happened to be the far-right tab, and I didn’t want to state knowledge I had not gained. Now I have gained the knowledge: I cannot get a new tab for one or more files opened from Windows Explorer to appear anywhere but the far right of my tabbar.

          Your plugin list doesn’t look like it would be affecting the way files are opened.

          Did you have one of those files opened earlier in Notepad++, and you had closed it and then later re-opened it when you do Explorer-ENTER? Because maybe it’s still remembering the file’s position from earlier in the current session. (it doesn’t happen that way for me: if I drag one of the tabs to the far left, then close that file, then open one or more of those files from Explorer-ENTER, they still open on the far right for me.)

          Sorry, I cannot reproduce your problem.

          appyfaceA 1 Reply Last reply Reply Quote 1
          • appyfaceA
            appyface @PeterJones
            last edited by

            @PeterJones and @Alan-Kilborn

            Thank you for trying to reproduce.

            In case it matters, all the unsaved tabs I have open, have been there for months, being restored through re-launches and reboots.

            The disk files I’m opening from explorer in the above example have been opened before by Notepad++, but only one at a time through ‘file -> open’ menu.

            I have tested with many groups of files, some have been opened by Notepad++ previously, some never opened by Notepad++. Some with Notepad++ already open, some cause Notepad++ to launch as part of opening. The result is always the same.

            I was able to influence ‘open from explorer’ file group to all open to the far right by opening a single file first - any file. Once this first disk file is open, and on the far right, my explorer launch opens the group of files to the right of that first ‘starter’ file.

            So it sounds like something connected to having a bunch of tabs but no actual saved disk file open, since it seems to work as expected as soon as a saved disk file is in the mix.

            But why you can’t reproduce, I’m not sure… Maybe different settings? I have ‘remember current settings for next launch’ and ‘enable session snapshot and periodic back’ checked, backup every 7 seconds, and a file path for the backup.

            Thanks for your help, I will continue to try to narrow this down.

            PeterJonesP 2 Replies Last reply Reply Quote 1
            • PeterJonesP
              PeterJones @appyface
              last edited by

              @appyface ,

              Sorry, I still cannot replicate. I took a brand new unzip of v7.8.9-64, ran it; it defaults to the options you specified:
              597806f2-52ac-4703-a83e-c4697c3eb893-image.png

              I created 4 new tabs, with edits in every one. I did the WindowsExplorer>ENTER on three files associated with Notepad++, and they opened on the extreme right, whether I had new 4 or new 1 selected. I closed those three disk files. I exited Notepad++ and ran again; it opened with the four edited-but-unsaved files with new 1 active. I did WindowsExplorer>ENTER on the three files, and they opened to the extreme right.

              Since the most-recently active Notepad++ hijacks any other instance, could you

              1. close all Notepad++,
              2. download portable/zip v7.8.9-64,
              3. unzip to someplace like a folder off your desktop,
              4. run that portable instance of Notepad++,
              5. create four empty but changed files
              6. exit with unsaved changes, with the left file active
              7. run that portable Notepad++
              8. verify that the unchanged files are still there
              9. use Windows Explorer > ENTER to open a set of files
              10. does it open to the right or put one or more of them to the far left

              If it works in the fresh portable but not in your normally-installed-c-program-files-noinst version, then it’s a setting difference – and you can compare all the settings between the fresh and your normally-run version, and see if you can narrow it down (that would be easier for you to do then for us). If the fresh portable behaves the same, it’s something about your Windows setup (or one of your plugins) that’s causing a difference – because our debug info shows up is virtually identical, down to Local Conf mode, OS Name, OS Version, OS Build, and ANSI codepage!

              Oh, wait, I do see a difference: you are running in Admin mode. I do not. Maybe try running non-Admin mode, and see if that gets rid of the problem.

              appyfaceA 1 Reply Last reply Reply Quote 1
              • appyfaceA
                appyface @PeterJones
                last edited by

                @PeterJones

                I am not sure how NOT to run as administrator? I only have one user account with admin rights. I am launching the executable directly. I don’t see any settings in Notepad++ itself?

                I will try another portable installation and see what happens (the one I’m using is installed as portable). Maybe it won’t start out in admin mode and I’ll be able to try.

                Thank you for the ideas. Kind regards.

                1 Reply Last reply Reply Quote 0
                • Terry RT
                  Terry R
                  last edited by

                  @appyface said in Tabs always open on the right?:

                  I am not sure how NOT to run as administrator?

                  If you read this post it explains how admin mode is created. In your case I suggest to check those settings, but turn them off.

                  https://community.notepad-plus-plus.org/topic/16869/open-in-administrative-mode/3

                  Terry

                  appyfaceA 1 Reply Last reply Reply Quote 1
                  • appyfaceA
                    appyface @Terry R
                    last edited by

                    @Terry-R
                    Administrator is not checked… this is on the executable, which I am launching directly as it is a portable install. Is there anyplace else I can check?

                    3c45bbc9-2242-48e7-b7bf-cd4c90aa7af4-image.png

                    1 Reply Last reply Reply Quote 0
                    • Terry RT
                      Terry R
                      last edited by Terry R

                      @appyface said in Tabs always open on the right?:

                      Is there anyplace else I can check?

                      Unfortunately I don’t know as I don’t operate in this mode. I just did a test to install a portable version (from @PeterJones link above). I am a local administrator, although there is some security checks on that and ran it, admin mode was off. Yet when I run it by right clicking and use “run as administrator” it’s on, obviously.

                      I’m beginning to think if your account is wide open administrator (with uac turned off) you will always get the admin mode as ON. Do you know if you have disabled UAC (user access control)? Here is a link to show you how to check it.
                      https://articulate.com/support/article/how-to-turn-user-account-control-on-or-off-in-windows-10

                      Looks like for research is warranted. I unfortunately haven’t delved much into this side of Notepad++

                      Terry

                      1 Reply Last reply Reply Quote 1
                      • Terry RT
                        Terry R
                        last edited by

                        I did another test, this time on a different system which is NOT part of my work AD, so not loaded with additional security controls. The UAC on it was disabled and when I ran Notepad++ (NPP) it ran in Admin Mode. I then turned on UAC to lowest level, again NPP ran in Admin Mode. Upped the UAC level, same and lastly UAC at the highest level, still NPP ran in Admin mode.

                        So it’s not a UAC function (at least not by itself) that allows or forbids Admin mode by just double clicking on the NPP executable.

                        I will say however that everyone with a “personal” PC generally runs their system as a local administrator. This can be a dangerous way to operate as any malware running in the context of that account (especially if UAC is also turned down or OFF) will be able to easily do so.

                        I explain this concept to users when they come to me with problems on their laptop. My suggestion is you should have a normal account for most work, and a administrator account for those times you need to install, remove or otherwise run apps that WON’T work under a normal account. The run as command often allows this to occur and it keeps a tighter control over any malware that wants to wreck havoc on your system.

                        At work we call this “Least Privileged Use”. The Wikipedia article is:
                        https://en.wikipedia.org/wiki/Principle_of_least_privilege

                        Terry

                        PeterJonesP 1 Reply Last reply Reply Quote 0
                        • PeterJonesP
                          PeterJones @Terry R
                          last edited by

                          @Terry-R , @appyface ,

                          At home, I run a privileged account with UAC turned all the way down to Never Notify (so I’ve got full Admin power all the time), and when I run Notepad++ either as my installed copy or from a portable, it does not automatically Run As Administrator , so I’m not sure what’s different.

                          Notepad++ v7.9   (64-bit)
                          Build time : Sep 14 2020 - 23:02:17
                          Path : C:\usr\local\apps\npp\npp.7.9.RC2.bin.x64\notepad++.exe
                          Admin mode : OFF
                          Local Conf mode : ON
                          OS Name : Windows 10 Home (64-bit) 
                          OS Version : 2004
                          OS Build : 19041.508
                          Current ANSI codepage : 1252
                          Plugins : mimeTools.dll NppConverter.dll NppExport.dll 
                          
                          1 Reply Last reply Reply Quote 0
                          • Terry RT
                            Terry R
                            last edited by

                            @PeterJones said in Tabs always open on the right?:

                            it does not automatically Run As Administrator , so I’m not sure what’s different.

                            This is starting to get complicated. And by now I’ve/we’ve managed to hijack this thread from “open to right”, to how does the admin mode function “automatically”, as opposed to via the “run as…” command (right click).

                            As I do seem to have a system which operates most like the OP’s one, I will do some more testing on whether admin mode has a bearing on the “open to right” tab issue that started here. Don’t wait up, this might be a day or so answer.

                            Terry

                            PeterJonesP 1 Reply Last reply Reply Quote 1
                            • PeterJonesP
                              PeterJones @Terry R
                              last edited by

                              @appyface,

                              While waiting for @Terry-R to be able to run more experiments:

                              1. Definitely try a separate portable in a different location (like your desktop), and see if it still always runs as administrator.
                              2. I found this SU question; it has the opposite desire, but a couple of the answers gave interesting things to look at, for things you could undo to get out of the run-as-admin:
                                1. this answser shows HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System:EnableLUA=0 will disable LUA and make all apps run as administrator; if yours is set 0, try setting it 1 instead
                                2. this answer shows a section of the registry where you can set individual executables to always run as admin, regardless of the properties/shortcut flags. So if you find an entry for notepad++.exe, then remove it.
                              Terry RT 1 Reply Last reply Reply Quote 0
                              • PeterJonesP
                                PeterJones @appyface
                                last edited by PeterJones

                                @appyface ,

                                And another SU answer that might come in handy – right click on the executable, “Troubleshoot compatibility”, “Troubleshoot”, then turn off all the checkboxes, then “no, I’m done” on the next screen. See if that fixes the problem for you.

                                Also, in the RClick > Properties > Compatibility, you might try “change settings for all users”, and see if the run-as-admin is set for all users, rather than just for you.

                                1 Reply Last reply Reply Quote 0
                                • appyfaceA
                                  appyface
                                  last edited by

                                  As long as we’re going all directions in my thread (and I don’t mind! great discussion), does anyone know why I’m not receiving emails when you post? I have turned everything on to Notification & Email but still I do not receive any emails. I do not have spam or other filters on this email account. I am watching this topic…

                                  7ec0c965-509f-4157-b905-50753cc4fc91-image.png

                                  PeterJonesP 1 Reply Last reply Reply Quote 0
                                  • appyfaceA
                                    appyface
                                    last edited by

                                    With regard to the latest replies, I may not be able to get to all your suggestions until later in the weekend. Will reply back then.

                                    1 Reply Last reply Reply Quote 0
                                    • PeterJonesP
                                      PeterJones @appyface
                                      last edited by

                                      @appyface said in Tabs always open on the right?:

                                      does anyone know why I’m not receiving emails when you post

                                      Because that feature of the forum is not enabled, despite it being listed in the options.

                                      1 Reply Last reply Reply Quote 1
                                      • Terry RT
                                        Terry R @PeterJones
                                        last edited by Terry R

                                        @PeterJones said in Tabs always open on the right?:

                                        While waiting for @Terry-R to be able to run more experiments:

                                        Well I’ve have completed my experiments. Whilst not exhaustive in themselves, I’m exhausted in creating 26 tabs each with different and unsaved changes and using the backup plan so unsaved files in themselves. I confirmed that the account I was running had the Admin Mode “ON”. That was further backed up by the titlebar showing [Administrator].
                                        When I right click on either a single file or several (of type txt and xml) and use the “Edit with Notepad++” option they always appear to the right of any existing tabs. And this is regardless of which tab was the currently viewed one in Notepad++.

                                        At this point I can safely say that my tests (and results) emulate those of @PeterJones even though I had Admin Mode on “automatically”, not thru having to say “run as…” or changing the shortcut to the compatibility settings with “run this program as administrator” ticked.

                                        So whatever is causing the new files on loading to appear elsewhere in the “tabbed” list is possibly rather unique or a possible malfunction in the operating system or Notepad++.

                                        Another possible test to be carried out by the OP is to use “Ctrl+Numpad 1” which is the default hotkey for the first tab in Notepad++ after they do the test as stated in the first post. The issue raised there was that one of the multiple files opens to the "right, the remainder open on the left. So once these multiple files are loaded, and then the hotkey used, does it actually go to one of the new files?

                                        I’m sort of wondering if the view of the tabs is somewhat skewed, rather than the actual order as Notepad++ sees them. Thus Ctrl+Numpad 1 would STILL go to the original 1st tab (often called New 1).

                                        As a side note, I had a need to install a fresh Windows 10 system, no AD influence or any changes made. The account I created was “Terry” which is a privileged account (administrator group). I then activated the actual administrator account with a password. My “Terry” account ran Notepad++ NOT in Admin Mode (so it shows OFF), yet when logged in as the actual administrator account I performed the same run and this time Notepad++ had admin Mode as ON!. So just logged in as an administrator level account is (on a fresh system) not enough to run Notepad++ in Admin Mode (ON), again that backs another finding by @PeterJones.

                                        Sorry I couldn’t find anything that helps, all this did was show that it (appears to) NOT happen. Tabs should always open to the right!

                                        Terry

                                        appyfaceA 1 Reply Last reply Reply Quote 2
                                        • appyfaceA
                                          appyface @Terry R
                                          last edited by

                                          @Terry-R and @PeterJones

                                          Both of you have gone well above and beyond in trying to sort this. I can’t thank you enough for all your efforts.

                                          This afternoon I logon and open Notepad++ and the titlebar does NOT say administrator. I open some files using <enter> on explorer and they all go to the extreme right (I have only unsaved tabs open) as I wish. The titlebar still does not say administrator. These are the same files I was working with in above screenshots, as well as others in the same directory.

                                          So were it not for your last post Terry-R, I would have claimed it is some difference in having administrator mode on… but now it is proved that is not the whole story…

                                          There is nothing I’ve (intentionally) done to stop administrator mode. Administrator mode has been on for awhile, I can’t say how long though… weeks… months… and I don’t know what I did to get it turned on.

                                          Thanks for the info about the emails not actually happening! Thought I had missed something in settings.

                                          1 Reply Last reply Reply Quote 3
                                          • appyfaceA
                                            appyface
                                            last edited by

                                            All morning I’m using Notepad++ and no administrator in title.

                                            Just now I open it and it says administrator… same XML files, same directory.

                                            No idea what is driving this…

                                            I see new version is out I’m going to retire this portable install and start from scratch with the new one, and see what happens.

                                            1 Reply Last reply Reply Quote 0
                                            • First post
                                              Last post
                                            The Community of users of the Notepad++ text editor.
                                            Powered by NodeBB | Contributors