Community
    • Login
    1. Home
    2. Popular
    Log in to post
    • All Time
    • Day
    • Week
    • Month
    • All Topics
    • New Topics
    • Watched Topics
    • Unreplied Topics
    • All categories
    • S

      autoupdater and connection temp.sh

      Watching Ignoring Scheduled Pinned Locked Moved Security
      32
      0 Votes
      32 Posts
      17k Views
      xomxX

      @Marten-van-Wezel said in autoupdater and connection temp.sh:

      the “Auto-Updater” tickbox is greyed out and I can’t untick it.

      You couldn’t untick it because of you also had the “Plugins Admin” selected at the same time (which needs the “Auto-Updater” component item for its functionality and thus “Auto-Updater” item cannot be unchecked until you also uncheck the “Plugins Admin”).

      @Marten-van-Wezel said in autoupdater and connection temp.sh:

      because my previous install did have gup.exe, it should be noted gup was not removed,

      Yes, that was a problem before, should be fixed in v8.9+ installers by
      https://github.com/notepad-plus-plus/notepad-plus-plus/commit/e89b0be86193c41f8170315ce4f6aa2386e96cf0

    • Thorsten HeuerT

      Feature Request / Question: Soft Wrap at Vertical Edge (Column 80) regardless of window size

      Watching Ignoring Scheduled Pinned Locked Moved Help wanted · · · – – – · · ·
      14
      1 Votes
      14 Posts
      415 Views
      PeterJonesP

      My rough implementation of @Coises suggestion is as follows

      # encoding=utf-8 """in response to https://community.notepad-plus-plus.org/topic/27351/ Trying to implement @Coises idea for setting the wrap to exactly 80 """ from Npp import * import ctypes from ctypes import wintypes # Define the RECT structure to match Win32 API class RECT(ctypes.Structure): _fields_ = [ ("left", wintypes.LONG), ("top", wintypes.LONG), ("right", wintypes.LONG), ("bottom", wintypes.LONG) ] def width(self): return self.right - self.left def height(self): return self.bottom - self.top def pysc_setWrap80(ed=editor): #console.write("ed={}\n".format(ed)) WRAPCHARS = 80 # Setup the Win32 function prototype user32 = ctypes.windll.user32 user32.GetClientRect.argtypes = [wintypes.HWND, ctypes.POINTER(RECT)] user32.GetClientRect.restype = wintypes.BOOL def get_window_size(hwnd): # 2. Instantiate the RECT structure rect = RECT() # 3. Call GetClientRect passing the rect by reference if user32.GetClientRect(hwnd, ctypes.byref(rect)): # 4. Parse the results # Client coordinates: top-left is always (0,0) return rect else: raise Exception("GetClientRect failed") sz = get_window_size(ed.hwnd) #console.write("{} => {}\n".format(ed.hwnd, {"width": sz.width(), "height": sz.height()})) usableWidth = sz.width() for m in range(0, 1+ed.getMargins()): w = ed.getMarginWidthN(m) usableWidth -= w #console.write("m#{}: {} => usableWidth: {}\n".format(m, w, usableWidth)) widthWrappedChars = ed.textWidth(0,"_"*WRAPCHARS)+1 # one extra pixel to be able to show the VerticalEdge indicator line wantMargin = usableWidth - widthWrappedChars if wantMargin < 1: wantMargin = 0 #console.write("{}\n".format({"windowWidth": sz.width(), "usableWidth": usableWidth, "pixelsFor80Char": widthWrappedChars, "wantMargin": wantMargin})) ed.setMarginRight(wantMargin) ed.setMarginLeft(0) def pysc_setWrap80e1(args=None): pysc_setWrap80(editor1) def pysc_setWrap80e2(args=None): pysc_setWrap80(editor2) def pysc_setWrap80eX(args=None): pysc_setWrap80(editor) editor.callback(pysc_setWrap80eX, [SCINTILLANOTIFICATION.PAINTED]) console.write("SetWrap80 registered callback\n")

      (this script tested in PythonScript 3)

      The FAQ (https://community.notepad-plus-plus.org/topic/23039/faq-how-to-install-and-run-a-script-in-pythonscript) explains how to run a script, or how to make it run automatically at startup

      The script registers the PAINTED notification – I found that UPDATEUI doesn’t happen everytime you change the window width, whereas PAINTED does… but it means that the callback is running a lot. I wish I knew of a notification that was better suited to just-on-resize, but I don’t. Maybe one of the other PythonScript experts can chime in with a better notification to use (or other suggestions for improvements). I just figured I’d do a proof of concept.

      If you aren’t changing window size all that often, then it would be better to make a copy of that script that just re-adjusts the 80-character margin on demand (ie, when you run the script) by not using the editor.callback(...) line, and instead just calling pysc_setWrap80(editor) at the end.

    • donhoD

      Notepad++ v8.9.1 Release

      Watching Ignoring Scheduled Pinned Locked Moved Announcements
      9
      6 Votes
      9 Posts
      7k Views
      PeterJonesP

      @mpheath said in Notepad++ v8.9.1 Release:

      I am unsure what you fixed.

      @mpheath, the user had outdated themes, which didn’t have the KEY style for either Langage:INI or Language:Properties. When v8.9.1 brought in all those style entries for the INI and Properties lexers, it began properly formatting those styles rather than ignoring those styles that weren’t defined in the themes. This was the intention of the new style-updating feature: it is intended to bring all themes up-to-date, so that they can format all the styles that users have not been seeing for years (for some, it’s a decade or more of missing syntax highlighting).

      @Drift91: As with all styles, if you don’t like the formatting that is chosen by default for a given style, you are free to change it for yourself. You go to Settings > Style Configurator > Language: INI or Language: Properties, select Style: KEY and change the Italic checkbox, as shown here for INI: 4b2d19b9-b707-4bc0-a668-3b1acb7041c8-image.png

    • N

      Plugin Manager v8.9.1 has ghosted us

      Watching Ignoring Scheduled Pinned Locked Moved Help wanted · · · – – – · · ·
      2
      0 Votes
      2 Posts
      24 Views
      PeterJonesP

      @nikkinisly ,

      The thing truly named “Plugin Manager” was last compatible with Notepad++ in v7.5.9 from October 2019. Had you really not updated since then?

      Or are you talking about Plugins Admin? That’s the builtin replacement since v7.6 in November 2019

      And it’s still in v8.9.1:
      0e15144b-967e-42d8-a505-a19330607d00-image.png

      My guess is that you deleted gup.exe and/or other of the content in the updater folder, or the plugin list DLL. To find out:

      Exit Notepad++ Perform steps 1-3 for each of the following files List of files C:\Program Files\Notepad++\notepad++.exe C:\Program Files\Notepad++\plugins\Config\nppPluginList.dll C:\Program Files\Notepad++\updater\GUP.exe C:\Program Files\Notepad++\updater\libcurl.dll If any of those files are missing, you will need to reinstall, making sure to include the auto-updater and Plugins Admin, because all of those files are required for Plugins Admin to work Steps Right click on the file and choose Properties Look to see if it still has the Unblock checkbox If it does, checkmark it, then click Apply / OK

      here is an example of a GUP.exe that still has the mark of the web:
      9baed526-5a1a-4497-a75b-1acdc23f3b85-image.png

      After making sure the Mark of the Web is gone from all those files, then restart Notepad++, and Plugins Admin should be there.

    • Troglo37T

      Is There a Way to Prevent Pasted Text from Spreading Out with Rows of Spaces?

      Watching Ignoring Scheduled Pinned Locked Moved Help wanted · · · – – – · · ·
      5
      0 Votes
      5 Posts
      142 Views
      PeterJonesP

      @PeterJones said in Is There a Way to Prevent Pasted Text from Spreading Out with Rows of Spaces?:

      implementing it in PythonScript today

      Thankfully, I found an old script which did something related, which was easy to update.

      # encoding=utf-8 """in response to https://community.notepad-plus-plus.org/topic/27385/ This will paste the CF_TEXT plaintext from the clipboard, but will convert any series of newline characters into a single space before doing the paste. Because this uses .insertText() instead of putting the modified text back into the clipboard and doing .paste(), it should avoid clobbering the clipboard. (based on @alan-kilborn's clipboard script here: <https://community.notepad-plus-plus.org/post/97132>) """ from Npp import * try: editor3h # third editor, hidden except NameError: editor3h = notepad.createScintilla() def get_clipboard_text_without_newlines(): retval = '' editor3h.clearAll() editor3h.paste() if editor3h.getLength() > 0: editor3h.rereplace(r'[\r\n]+', ' ') # replace all newline seqeuences with a single space retval = editor3h.getText() return retval editor.beginUndoAction() editor.insertText(editor.getCurrentPos(), get_clipboard_text_without_newlines()) editor.endUndoAction()

      This has been tested in the PythonScript 3 plugin. The PythonScript FAQ explains how to install PythonScript plugin, and how to run a script using PythonScript plugin, and even how to assign a keyboard shortcut to the script. Make sure you follow the instructions for PythonScript 3, not PythonScript 2 (as I have not tested under the older plugin syntax, though it will likely work there)

    • Jay SJ

      PythonScript 3.0.24.0 - "PluginsManager:runPluginCommand Exception" dialog with "Access Violation" with one of my scripts.

      Watching Ignoring Scheduled Pinned Locked Moved Help wanted · · · – – – · · · pythonscript python error scripting access violation plugins
      2
      0 Votes
      2 Posts
      54 Views
      EkopalypseE

      @Jay-S

      I replied here.

    • Mark BoonieM

      Show (or keep) subsets of a file

      Watching Ignoring Scheduled Pinned Locked Moved Help wanted · · · – – – · · ·
      1
      0 Votes
      1 Posts
      18 Views
      No one has replied
    • Nazar HotsaN

      Strange highlighting in PHP files

      Watching Ignoring Scheduled Pinned Locked Moved General Discussion
      3
      0 Votes
      3 Posts
      133 Views
      Nazar HotsaN

      Thank you! Problem solved.

    • PeterJonesP

      FAQ: February Security Announcement

      Watching Ignoring Scheduled Pinned until 3/1/26, 9:17 PM Locked Moved Security
      2
      2 Votes
      2 Posts
      230 Views
      donhoD

      Important Clarification: Notepad++ Security Incident (Indicators of Compromise provided by our former hosting provider is included):
      https://notepad-plus-plus.org/news/clarification-security-incident/