sample config
-
Hello, @peterjones, @justin-lang, @alan-kilborn and All,
To @peterjones only :
Let’s back to your first regex version
(?i-s)\A(^.*\R(?!^username \S+ password \S+$))+\z
. This regex look for a continuous range of lines, not followed with an entire lineusername •••• password ••••
, between the very beginning and the very end of current file. In this case a match occurs and this file is displayed in theSearch results
windowBut, if so, in order to match the
\z
assertion, as the last line of current file may not end with EOL chars, this first version should be(?i-s)\A(^.*\R?(?!^username \S+ password \S+$))+\z
with a question mark?
after\R
?And, indeed, this first modified version does work on my machine, with the additional results already known when the
username •••• password ••••
is the first line of current fileWell, end of the story regarding this bugged version, anyway !!
To All :
I improved my own version to :
SEARCH
\A(?s)(?:.*?(?i)^username \S+ password \S+$(*SKIP)(*F)|)
As you can see :
-
The regex now uses a non-capturing group ( could be interesting if file of big size or with long lines ! )
-
It searches for the smallest range of chars till a entire line
username •••• password ••••
-
In case of no line
username •••• password ••••
exists, in current file, the second empty alternative simply searches the\A
position, which is the very beginning location of current scanned file !
Now, here is an off-topic subject :
When doing all my tests, I wanted to keep the “Find in Files” dialog opened, after each click on the
Find All
button ! So, I changed, in the<FindHistory •••••••• >
section of theconfig.xml
file, the value of thedlgAlwaysVisible
attribute fromno
toyes
However, after re-starting N++, no luck : the “Find in Files” dialog was still closed after running a search :-(( I verified that this wrong behavior occurs since the
v7.9.0
release !Could you confirm me that fact, with the new
Non-XP
releases ? In case of positive answer(s), I will create an issue, on GitHub !Best Regards,
guy038
-
-
When doing all my tests, I wanted to keep the “Find in Files” dialog opened, after each click on the Find All button ! So, I changed, in the <FindHistory •••••••• > section of the config.xml file, the value of the dlgAlwaysVisible attribute from no to yes
Maybe what you are trying to do manually is conflicting with this setting?:
EDIT: I have no idea why my screenshot is twice as big vertically as intended! :-)
-
Hi, @alan-kilborn and All,
How silly am I !! I did not notice that this old setting has been adding in the
Preferences
dialog. Nice ! So , no need to create any issue : good ;-)) This also explains why this pseudo-issue begins with thev7.9.0
issue !After ticking this option, in the
Preferences
dialog and closing N++, the value of thedlgAlwaysVisible
attribute is stillno
in theconfig.xml
file !Cheers,
guy038
-
@guy038 said in sample config:
After ticking this option, in the Preferences dialog and closing N++, the value of the dlgAlwaysVisible attribute is still no in the config.xml file !
Hmm. I would think that
dlgAlwaysVisible
would get erased from theFindHistory
section at the N++ release that moves control to theSearching
section of config.xml; example of that:<GUIConfig name="Searching" monospacedFontFindDlg="yes" stopFillingFindField="no" findDlgAlwaysVisible="yes" confirmReplaceInAllOpenDocs="yes" />
Notice the name is now slightly different, too:
findDlgAlwaysVisible
But…I really don’t know how such “obsolete” items are handled.
So , no need to create any issue
If obsolete settings are supposed to be removed, maybe THAT’S an issue you could open!