From 37d75c25ae2024c11c0e215ceda49b28cb72a1be Mon Sep 17 00:00:00 2001 From: PeterCJ Date: Wed, 21 May 2025 10:50:23 -0700 Subject: [PATCH] Remove Duplicate Lines affects bookmarks see https://github.com/notepad-plus-plus/notepad-plus-plus/issues/16061#issuecomment-2897677364 --- content/docs/editing.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/content/docs/editing.md b/content/docs/editing.md index 2d906c4c..172ed50c 100644 --- a/content/docs/editing.md +++ b/content/docs/editing.md @@ -307,7 +307,9 @@ Below the **Begin/End Select** entries, there are a number of sub-menus to the * * **Duplicate Current Line**: Duplicates the current line. (Prior to v8.6, if a selection was active it would duplicate just that selection, but starting in v8.6, selection state is ignored for this menu command; if you want the old behavior, the Ctrl+D shortcut is, by default, still assigned to the selection-aware duplication, under `SCI_SELECTIONDUPLICATE` in the [Shortcut Mapper](../preferences/#shortcut-mapper).) * There are two versions of the Remove Duplicates functionality: * **Remove Duplicate Lines**: leaves only the first instance of any full lines that have more than one copy anywhere in the active file; acts upon the line set spanned by the current selection, or the entire file if no active selection + - _Note_: Because of the way it's implemented, this command also clears all bookmarks. * **Remove Consecutive Duplicate Lines**: will only remove duplicates that are on the lines immediately following the first instance (still keeping the first instance); acts upon the line set spanned by the current selection, or the entire file if no active selection + - _Note_: Because of the way it's implemented, this command does not clear all bookmarks. However, if a bookmarked line is one of the consecutive duplicate lines removed, that bookmark will remain on the old line number (which means it is now bookmarking whatever text used to be _after_ that line). * NOTE: Duplicates removal is performed with the assumption that all line-endings in the file are uniform and match the current selection for the file being edited -- the quickest way to check that selection is to glance at the status bar, where the current line-ending type is shown either as `Windows (CR LF)`, `Unix (LF)` or `Macintosh (CR)`. It might be desirable to check the line-ending types in your file before executing a sorting operation, and use the **Edit > EOL Conversion >** choices or right-click on the Status Bar's EOL indicator to fix the line endings if necessary. * There are methods for splitting lines and joining lines together: * **Split Lines**: will insert a line-ending into a long line(s): if there is one or more [Vertical Edge](../preferences/#margins-border-edge) value specified, it will split at the right-most Vertical Edge; otherwise, it will split at the current size of the editor window. It operates on the lines spanned by the current stream selection or the single line of the [caret](#caret-and-cursor "typing/insertion cursor") if no stream selection is currently active.