Skip to content

Commit

Permalink
Update changelog, help, readme, versioninfo; correct yet another erro…
Browse files Browse the repository at this point in the history
…r in Configuration.cpp.
  • Loading branch information
Coises committed Apr 18, 2023
1 parent b0b7205 commit b274460
Show file tree
Hide file tree
Showing 5 changed files with 22 additions and 6 deletions.
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
# Columns++ for Notepad++ -- Pre-releases

## Vesion 0.2.0.6-alpha -- April 18th, 2023

* Changed to search in "indicated region" instead of "rectangular selection." This is more flexible, makes it easier to see what is happening, and solves the problem of replacements causing which text is included in the selection to change (Issue #6) -- but it is a little harder to explain how it works to end users. It is possible to use the existing Notepad++ Styles (1st-5th or Find Mark Style), or to use a custom indicator just for Columns++. The indicator can be chosen on the Search dialog; settings for the custom indicator number and color are in Options.

* A known loose end is that backward regular expression searches are not disabled, but they also are not done "zig-zag" (backward by lines but forward in each line) as before, because that concept is not so straightforward when using indicators instead of rectangular selections. Whether to disable them, allow them (with whatever unexpected results it is that can happen), or re-implement the "zig-zag" approach remains to be decided.

* There is no way that I know of to ensure that the indicator number used for custom selections is not also used by some other plugin. (DSpellCheck, for example, just hard-codes number 19.) For that reason, I made it configurable; but there's no easy way to explain to the end user what's going on, since we don't really know what's going on. For now, I left it default enabled using indicator number 18; if experience shows this conflicts with some other plugin, it can either be changed to another number or initially disabled.

## Version 0.1.0.5-alpha - April 14th, 2023

* Added new prompts when a command needs a rectangular selection and the current selection is not rectangular or is zero-width.
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ The integrated implementation of __Elastic tabstops__ works to line up columns w
## Main Features

* __Elastic tabstops:__ Columns++ includes a new implementation of Nick Gravgaard's [Elastic tabstops](https://nickgravgaard.com/elastic-tabstops/). _(Please note that as of this writing I have not communicated with Mr. Gravgaard about my implementation of his proposal, and no endorsement on his part is implied.)_
* __Find and replace in rectangular selections__
* __Find and replace:__ Columns++ supports find and replace within regions, which can be defined by rectangular selections or multiple selections.
* __Calculations:__ There are commands to add or average numbers in one or more columns.
* __Alignment:__ You can left- or right-align text, or line up numbers.
* __Sorting:__ Columns++ includes sort commands that work correctly with rectangular selections in files that use tabs.
Expand Down
16 changes: 12 additions & 4 deletions help.htm
Original file line number Diff line number Diff line change
Expand Up @@ -240,13 +240,21 @@ <h3>Automatically enabling or disabling elastic tabstops</h3>

<section id=search><h2>Search</h2>

<p><strong>Columns++</strong> offers the ability to find and replace in a rectangular selection. The <strong>Search...</strong> item on the <strong>Columns++</strong> menu opens the <strong>Search in rectangular selection</strong> dialog. Most of the options on this dialog are similar to the corresponding <strong>Notepad++</strong> search options.</p>
<p><strong>Columns++</strong> offers the ability to find and replace within a region marked by an <em>indicator</em>. <strong>Notepad++</strong> uses several indicators, including the 1st to 5th Styles from the Search menu and the Find Mark Style used by the <strong>Mark</strong> function. <strong>Columns++</strong> lets you use any one of those six indicators, or a custom indicator, to define the region for searching.</p>

<p>To allow for repeated finding and replacing, <strong>Columns++</strong> remembers your last rectangular selection even after it finds and selects text. Within reason, you can move the caret or even edit text and still resume searching, from the caret position, within the previous selection. You can tell whether the previous selection will be restored by the text on the <strong>Find</strong> button: if it says <strong>Find First</strong> or <strong>Find Last</strong> a new search will begin in a new rectangular selection; if it says <strong>Find Next</strong> or <strong>Find Previous</strong>, searching will resume within the previous rectangular selection.</p>
<p>The <strong>Search...</strong> item on the <strong>Columns++</strong> menu opens the <strong>Search in indicated region</strong> dialog. Most of the options on this dialog are similar to the corresponding <strong>Notepad++</strong> search options.</p>

<p>Lines are searched sequentially (forward or backward), one at a time. It is not possible for a single match to span multiple lines. When no more occurrences of the search string can be found, <strong>Columns++</strong> restores the rectangular selection.</p>
<p>When you initiate a search, <strong>Columns++</strong> looks for a rectangular selection or a multiple selection from which to create a search region. If you do not have a such a selection but you do have text marked with the indicator you are using for search, the search proceeds within the indicated region. If you have neither a searchable region nor a rectangular or multiple selection, <strong>Columns++</strong> will prompt you to make a selection.</p>

<p>When using regular expressions, the circumflex (<strong>^</strong>) matches only if the left end of the selection is at the beginning of the line; the dollar sign (<strong>$</strong>) matches the end of the selection on each line regardless of whether it is at the end of the line. If you select both <strong>Backward direction</strong> and <strong>Regular expression</strong> lines are searched from bottom to top, but from left to right within each line.</p>
<p>Segments of the indicated region are searched sequentially (forward or backward), one at a time. It is not possible for a single match to span multiple segments. When no more occurrences of the search string can be found, <strong>Columns++</strong> gives a status message to that effect; if focus remains on the search dialog, the next search will resume from the beginning of the region.</p>

<p>The <strong>Indicator</strong> section at the bottom of the <strong>Search in indicated region</strong> dialog lets you select which indicator will be used to identify the search region.</p>

<p>The <strong>Clear automatically</strong> checkbox determines whether an existing indicated region is cleared when the dialog is closed and when initiating a search when you have a rectangular or multiple selection. This option is set to checked when you choose the <strong>Custom Style</strong> indicator and to unchecked when you choose any other indicator; however, you may change it after you select an indicator and it will stick until you change the indicator again.</p>

<p>The <strong>Clear</strong> button in the <strong>Indicator</strong> section clears the current search indicator, so that there is no search region indicated.</p>

<p>It is currently possible to select both <strong>Backward direction</strong> and <strong>Regular expression</strong>; however, this combination may produce unexpected results.</p>

</section>

Expand Down
Binary file modified src/ColumnsPlusPlus.rc
Binary file not shown.
2 changes: 1 addition & 1 deletion src/Configuration.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ void ColumnsPlusPlusData::loadConfiguration() {
if (setting == "backward" ) searchData.backward = value != "0";
else if (setting == "wholeword") searchData.wholeWord = value != "0";
else if (setting == "matchcase") searchData.matchCase = value != "0";
else if (setting == "autoClear") searchData.autoClear = value != "0";
else if (setting == "autoclear") searchData.autoClear = value != "0";
else if (setting == "find") {
if (value.length() > 2 && value.front() == '\\' && value.back() == '\\') {
std::wstring s = toWide(value.substr(1, value.length() - 2), CP_UTF8);
Expand Down

0 comments on commit b274460

Please sign in to comment.