Commit Graph

1093 Commits

Author SHA1 Message Date
Rainer Kottenhoff
1a9f19d961 + fix: restore selection after undo: revert selection mode too 2017-08-16 21:40:55 +02:00
Rainer Kottenhoff
b88fe6bf26 + add Del/Back Selection preserving on Undo/Redo 2017-08-16 15:39:21 +02:00
Rainer Kottenhoff
7f52ae6a4d + fix: restore "rectangular" selection too on "Selection Cut" Undo/Redo 2017-08-16 14:13:18 +02:00
Rainer Kottenhoff
ba09c53f27 + Cut Selection (Ctrl-X) will preserve Selection on Undo/Redo 2017-08-16 12:33:45 +02:00
Rainer Kottenhoff
e66c9cae8f dev trial 1 2017-08-16 00:18:06 +02:00
Rainer Kottenhoff
d9ef89f715 + fix Toolbar Button "Save" has to be enabled on encoding changes
+ encode Notepad.rc as Unicode BOM (UTF-16LE) to enable unicode characters for resource embedding
2017-08-15 21:45:29 +02:00
Rainer Kottenhoff
490b99831a + fix bug on path compare for editing own settings file (.ini) to disable "save settings" menu entries (should be case insensitive) 2017-08-15 19:27:16 +02:00
Rainer Kottenhoff
2e2e1707cd + further discussions on notepad2-mod PR #200 convinced me, that the "reload UTF-8 bugfix" solves a problem regarding pure ASCII files reloaded as UTF-8.
+ add menu entries for launching WebTemplates (specified in section [Settings2]) with selected text as arguments
2017-08-15 19:12:13 +02:00
Rainer Kottenhoff
2a11751359 + Zero initializing string buffers (hardening code while searching an issue regarding "Recent Files" list in "relative paths" mode ... 2017-08-15 17:32:31 +02:00
Rainer Kottenhoff
461b848156 + add Enabling/Disabling Save-Button in toolbar according to file modified indicator
- moving Save Settings enabler (in case of own settings loaded into editor) to method (instead of define)
2017-08-15 09:12:18 +02:00
Rainer Kottenhoff
63479b9a26 Merge branch 'master' into NP2-mod_Enhancements 2017-08-14 21:34:34 +02:00
Rainer Kottenhoff
640274b0a5 + took the nice pull request from @zufuliu (notepad2-mod PR #200 : (https://github.com/XhmikosR/notepad2-mod/pull/200)
and put some of the "hidden" shortcuts into NP3's menu tree.
   - couldn't reproduce the "reload as UTF-8 not work bug" in NP3 (?) - so didn't merge the related change.
     (if someone can reproduce it, please tell me)
+  I "guard" the shortcut for direct editing the NP3's .ini-file (Ctrl+F7) by disabling "Save Settings Now (F7)" and  "Save Settings on Exit" - Flag
    as long as I edit the settings file itself.
    (Example not disabling this:  Editing the .ini-file while "Save Settings on Exit"-Flag is checked,
     leaving NP3 would override the just edited .ini-file with "old" NP3 settings ...)
2017-08-14 21:30:16 +02:00
Rainer Kottenhoff
592796d44f menu integration of "hidden" commands 2017-08-14 18:12:13 +02:00
Rainer Kottenhoff
223a977207 Merge branch 'Sandbox' into Code_Quality 2017-08-11 20:13:03 +02:00
Rainer Kottenhoff
93325e250d + add printing additional option /v(d)ialog to allow access to the Printer dialog (as on Menu: Print... ) 2017-08-11 20:10:52 +02:00
Rainer Kottenhoff
935eed6d1e Merge branch 'Sandbox' into Code_Quality
# Conflicts:
#	src/Notepad3.c  (manually linebased merged)
2017-08-11 19:07:32 +02:00
Rainer Kottenhoff
fc10dbf655 + add command line option ( /v ) to print file immediately and quit (like Window's original notepad.exe /p option) 2017-08-11 18:33:38 +02:00
Rainer Kottenhoff
af4d1292f4 + raise Warning Level from 3 -> 4, and fix corresponding warnings
+ option: build-time: treat warning as error (build fails)
+ cleanups reported by CppCheck v.1.79  (except issue: 'variableScope')
+ remove _CRT_SECURE_NO_WARNINGS to see security warnings for deprecated functions;
+ remove macro-definition for BOOKMARK_EDITION (bookmarks are fixed component of NP3 now)
   (code has not been excaped by this MACRO consistently)
2017-08-11 14:18:39 +02:00
Rainer Kottenhoff
8600d566db fixing issue #35 (preserve FileExtension settings while switching Styles / 2nd Default Scheme)
+ enlarge some string buffers for dialogs
+ fixing np3encrypt vcxproj files
2017-08-11 03:35:21 +02:00
Rainer Kottenhoff
d4ce0417ba - move settings for HighDPI Toolbar to [Window] section, to ge more portable configuration (same .ini-File on different screens) 2017-08-09 16:44:48 +02:00
Rainer Kottenhoff
1b71079b13 - fix: nullptr access while pressing "favorites" toolbar button on 'virgin' NP3
- reintroduce HighDPI toolbar:
  .ini-File settings:  section [Toolbar Images]
    + (new) HighDpiToolBar=
        val  -1  (or not set at all) => depending on screen resolution:
                 higher than Full-HD (1920x1080) -> select internal HighDPI-Toolbar
       val  0:  use internal low resolution Toolbar  (old behaviour)
       val  1:  use internal HighDPI-Toolbar
   -  (old)  BitmapDefault=<bitmap-file-path>  overrides HighDpiToolBar setting and uses <bitmap-file-path> (if valid)
2017-08-09 10:51:43 +02:00
Rainer Kottenhoff
b944089efc - cleanup .vcxproj to support "All Config" ans "All Platform" selection
~ maybe it is time to change to Platform Toolset "Visual Studio 2017 - Windows XP (v141_xp)" ?

 - add existing recoding accelerator keys (Ctrl+Alt+F & Ctrl+Shift+A)
   to "Recode" menue  (func: reload file forcing this encoding type)

 - add version info for used Scintilla library
  ~ VERSION_SCIVERSION should be set by Version.exe (version patcher)
    and can be picked from provided scintilla\version.txt

 - some code-cleanup (cleancode-developer pathfinder rule)
   while trying to trace down notepad2-mod issue #121
   (i am able to reproduce, but didn't find the reason (yet))
2017-08-08 11:56:56 +02:00
Derick Payne
92a23f0bf3 Merge pull request #43 from RaiKoHoff/Bugfixes_and_More
some fixes and features, that missed the latest notepad2-mod
2017-08-07 09:31:40 +02:00
Rainer Kottenhoff
d5e480f1eb - minor cleanups reported by CppCheck v.1.79
- fix exception - reported in notepad2-mod pull request (Crash fixing. #172), which has been rejected there,
  but I was able to reproduce it in VS2017 debug mode (initial defaults for exception handling).
  (https://github.com/XhmikosR/notepad2-mod/pull/172)

- incorporate changes from  notepad2-mod from v.4.2.25.995  to  v.4.2.25.998
  (one fix,  the other changes we have done before already)

- Change shortcuts for the following actions:
  (-) Toggle Transparent Mode:  moved from Ctrl+0  to  Ctrl+Numpad_*
  (x) Reset Zoom: Ctrl+/ change to Ctrl+0      ($v_5.0.26)
  Additional Accelerator Keys, as suggested by (https://github.com/XhmikosR/notepad2-mod/pull/197)
  (+) Toggle Line Comment : in addition to Ctrl+Q add Ctrl+/  with same functionality
  (+) Do Stream Comment : in addition to Ctrl+Shift+Q add Ctrl+Shift+/ with same functionality
  believing new shortcuts are more convenient and more widely used, aren't they?
2017-08-06 23:35:37 +02:00
Derick Payne
489db38dc4 Back to smaller toolbar buttons. 2017-08-06 18:38:45 +02:00
Rainer Kottenhoff
74ec34dad3 integrate Scintillas DirectWrite technology:
- Settings:  SciDirectWriteTech, SciFontQuality
  + values according to Scintilla documentation
  + values = -1 (or not set) - don't call SCI API anyway - should be the same as DEFAULT technology settings (values = 0)
      SC_TECHNOLOGY_DEFAULT = 0,  SC_TECHNOLOGY_DIRECTWRITE = 1,  SC_TECHNOLOGY_DIRECTWRITERETAIN = 2,  SC_TECHNOLOGY_DIRECTWRITEDC = 3
      SC_EFF_QUALITY_DEFAULT = 0, SC_EFF_QUALITY_NON_ANTIALIASED = 1, SC_EFF_QUALITY_ANTIALIASED = 2, SC_EFF_QUALITY_LCD_OPTIMIZED = 3
2017-08-05 22:01:46 +02:00
Rainer Kottenhoff
da073686dc reverting, and fixing encoding / code-page issues:
- consistent encoding <> code-page handling (including Scintilla's code-page settings)
- Scintilla issue regarding notepad2-mod issie #173 (see https://github.com/XhmikosR/notepad2-mod/pull/193)
- allow arbitrary conversion between encodings (even it it does not make sense in any case)
  (instead of doing silently nothing but changing encoding info on status bar)
2017-08-05 20:20:22 +02:00
Rainer Kottenhoff
7647e03801 refactoring encoding and code-page handling:
- using Scintilla UTF8 code-page internally for most encodings,
  solves some encoding/code-page problems, the behaviour slightly changes:

  + if DefaultEncoding is not set (or set to DefaultEncoding = -1),
    initial encoding is set to current system's code-page, e.g. Windows-1252
    Scintilla's internal UTF8 code-page is used for edit box,
    that means copy/paste from clipboard may show characters which are
    not valid in this char-set of the selected code-page.
    Trying to save a file with this invalid UTF8 chars will result in conversion dialog:
    ("...  encoding from ANSI to non-ANSI (and vice versa) may replace unsupported text with default characters ...")

 + if DeaultEncoding = 0 (ANSI):
   a) if LoadASCIIasUTF8 = 0 (FALSE), Scintilla's internal ANSI code-page is used for edit box
      that means copy/paste from clipboard may convert chars to ANSI ()
   b) if LoadASCIIasUTF8 = 1 (TRUE), Scintilla's internal UTF8 code-page is used for edit box
    that means the universal UTF8 encoding is used

 + if DeaultEncoding = nnn (corresponding to some ANSI code-page encoding):
   same as if DefaultEncoding is set to corresponding code-page (see section "DefaultEncoding is not set")
2017-08-04 22:49:21 +02:00
Rainer Kottenhoff
bc7c7f98bd Issue #32: add VisualStudio's editor behaviour for Ctrl-C and Ctrl-X if nothing is selected (copy / cut current line) 2017-08-03 17:30:03 +02:00
Rainer Kottenhoff
67ff6f274e Refactoring/Fixes:
- standard encoding is ANSI, (resp. UTF8 - if no(-1) encoding default is given in .ini-file: DefaultEncoding=n)
- copy/paste non ANSI characters to ANSI encoded NP3 windo will recode them to ANSI (same as manually recode)
2017-08-03 15:34:28 +02:00
Rainer Kottenhoff
854f0a7cec reverting: don't use current system codepage for encoding default (this will lead to problems on changing encoding) 2017-08-03 12:36:39 +02:00
Rainer Kottenhoff
c299225d6c to fix locale code page / encoding issue: using systems default CodePage for default encoding (and default code page), if default encodig is not persisted in .ini-file
to preserve old standard behaviour, DefaultEncoding "ANSI" may be set in .ini-File
2017-08-02 20:48:14 +02:00
Rainer Kottenhoff
8a94087563 - fixed: broken Ctrl-Q (toggle line comments)
- remember more settings/checksboxes for “Find text” dialog between sessions (.ini-file persistence of (open) dialog)
- DeelX RegexSearch:  remove EXTENDED mode - that disables white space ignore and '#' as line comment (expexted/convenient behaviour)
- fixing ".LOG-feature" of Notepad : ".LOG" recognition must be case sensitive
2017-08-02 15:48:40 +02:00
Rainer Kottenhoff
db8b9361c8 - set UTF-8 as character encoding, if no valid character encoding is chosen for default (.ini) - see notepad2-mod merge #69
- change "Notepad3.ini": don't use 2nd default syntax scheme by default (Notepad3 issue #21)
- Add Microsoft Visual C++ 2017 (vc141)
2017-03-30 14:02:35 +02:00
Rainer Kottenhoff
1f5354b194 + update to Scintilla 371 (NP2 adaption due to deprecated data types) 2016-12-06 11:49:54 +01:00
Rainer Kottenhoff
86c8fcaea0 + update Scintilla to Version 3.7.0
- add _SCL_SECURE_NO_WARNINGS preprocessor define (Scintilla uses "unsafe" std::copy now)
+ integrate additional Lexers: lexJSON, lexMATLAB, lexRegistry (see also McNeight/notepad2-mod)
+ Insert GUID insertion option (XhmikosR/notepad2-mod#171)
+ fixing sporadic initial crash (XhmikosR/notepad2-mod#172)
2016-11-15 10:37:30 +01:00
Derick Payne
b843870b5a Updated Scintilla to version 3.6.4
Updated Scintilla to version 3.6.4
2016-04-17 20:44:10 +02:00
Derick Payne
229fb8ac22 New Encryption Feature 2016-01-29 22:24:29 +02:00
Derick Payne
ddf6a172bb Fixed Missing Wildcard Search
Fixed Missing questions marks on search and replace windows.
2016-01-29 19:33:38 +02:00
Derick Payne
b8c5f0717c Update Scintilla to version 3.6.2 2015-11-14 11:20:53 +02:00
Derick Payne
17a2bd3629 Support for MiniPath added
Support for MiniPath added
2015-11-14 11:01:10 +02:00
Derick Payne
eef8262263 Replaced swscanf with the safer swscanf_s 2015-11-13 08:51:12 +02:00
Derick Payne
3737845a15 Initial Release
This is the start of the project.
2015-11-13 07:44:58 +02:00