[LyX/master] set default visual_cursor preference to true
Udi Fogiel
ufogiel at lyx.org
Mon Jul 6 23:51:17 UTC 2026
commit 5caa9371736a6e7d5b93dee02367d032221f3adf
Author: Udi Fogiel <ufogiel at lyx.org>
Date: Tue Jul 7 02:48:59 2026 +0300
set default visual_cursor preference to true
See the discussion at https://www.mail-archive.com/lyx-users@lists.lyx.org/msg116432.html
---
lib/configure.py | 2 +-
lib/scripts/prefs2prefs_prefs.py | 15 ++++++++++++++-
src/LyXRC.cpp | 2 +-
src/LyXRC.h | 2 +-
4 files changed, 17 insertions(+), 4 deletions(-)
diff --git a/lib/configure.py b/lib/configure.py
index 6db0855a9a..a95cb131c6 100644
--- a/lib/configure.py
+++ b/lib/configure.py
@@ -2111,7 +2111,7 @@ if __name__ == '__main__':
lyx_check_config = True
lyx_kpsewhich = True
outfile = 'lyxrc.defaults'
- lyxrc_fileformat = 41
+ lyxrc_fileformat = 42
rc_entries = ''
lyx_keep_temps = False
version_suffix = ''
diff --git a/lib/scripts/prefs2prefs_prefs.py b/lib/scripts/prefs2prefs_prefs.py
index c6807ceb08..6f0ba8002d 100644
--- a/lib/scripts/prefs2prefs_prefs.py
+++ b/lib/scripts/prefs2prefs_prefs.py
@@ -181,6 +181,11 @@
# Incremented to format 41, by spitz
# Use proper string values for \language_package_selection
+# Incremented to format 42, by ufogiel
+# Add \visual_cursor false if it is not otherwise set (the new
+# default is true, so this keeps behavior the same for existing
+# users)
+
# NOTE: The format should also be updated in LYXRC.cpp and
# in configure.py (search for lyxrc_fileformat).
@@ -546,6 +551,13 @@ def rename_langpack(line):
return (True, line)
+def add_visual_cursor_default(lines):
+ for l in lines:
+ if l.startswith("\\visual_cursor"):
+ return
+ lines.append("\\visual_cursor false")
+
+
# End conversions for LyX 2.5 to 2.6
####################################
@@ -600,5 +612,6 @@ conversions = [
[ 38, []],
[ 39, []],
[ 40, [bookmarks_visibility]],
- [ 41, [rename_langpack]]
+ [ 41, [rename_langpack]],
+ [ 42, [add_visual_cursor_default]]
]
diff --git a/src/LyXRC.cpp b/src/LyXRC.cpp
index cb0dece33e..ad61ca2d33 100644
--- a/src/LyXRC.cpp
+++ b/src/LyXRC.cpp
@@ -60,7 +60,7 @@ namespace {
// The format should also be updated in configure.py, and conversion code
// should be added to prefs2prefs_prefs.py.
-static unsigned int const LYXRC_FILEFORMAT = 41; // Use proper string values for \language_package_selection
+static unsigned int const LYXRC_FILEFORMAT = 42; // Change default of \visual_cursor to true
// when adding something to this array keep it sorted!
LexerKeyword lyxrcTags[] = {
{ "\\accept_compound", LyXRC::RC_ACCEPT_COMPOUND },
diff --git a/src/LyXRC.h b/src/LyXRC.h
index 26776dab46..dfe749f585 100644
--- a/src/LyXRC.h
+++ b/src/LyXRC.h
@@ -408,7 +408,7 @@ public:
///
std::string language_package_selection = "auto";
/// bidi cursor movement: true = visual, false = logical
- bool visual_cursor = false;
+ bool visual_cursor = true;
///
bool auto_number = true;
///
More information about the lyx-cvs
mailing list