Tabs always open on the right?



  • @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.



  • @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.



  • @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.



  • @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



  • @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



  • @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



  • 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



  • @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 
    


  • @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



  • @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.


  • @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.



  • 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



  • 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.



  • @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.



  • @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



  • @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.



  • 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.



  • I just unzipped the portable version of new 7.9 x64 into a brand-new empty directory. I did not copy over any previous files, this is vanilla.

    My first launch is by running the executable directly, and guess what. ‘Administrator’ is in the title.

    I copied in the debug info into the tab and here’s the screenshot:

    252a10c3-40f9-48cc-b36e-ee981dc3748e-image.png

    Still no idea what is cluing administrator on/off.



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

    Still no idea what is cluing administrator on/off.

    I had no idea either, see this POSTING and the containing thread.

    As I said in that posting, being stuck in “administrator” mode just sort of “went away” after a certain N++ release, and luckily for me, it hasn’t returned. :-)



  • Admin mode is coming and going…

    And stranger… I closed the new 7.9 and navigated to the directory with 7.8.9 and opened it, and to my surprise, none of my “unsaved” tabs are loaded into the old executable.

    This makes no sense. The old executable is still pointing to its own directory /backup folder and the backups are there and intact, I can open them with regular Notepad (or Notepad++) directly and they’re fine. The old 7.8.9 no longer opens them automatically when I launch the executable.

    I also confirmed, 7.9 is pointing to its own directory /backup folder and of course it has no files since it is vanilla, so it opens with one empty new tab.

    I’ve no clue why my 7.8.9 executable is not loading the 36 tabs I had before… nothing is lost, it just is not automatically opening it. I have done nothing to its configuration. I exited it, then unzipped the new one, launched and got the screenshot to post here, and that’s it.

    Gremlins…


Log in to reply