Re: [code] Scintilla: Block caret appears on selection end instead of after it. (Textadept 9.3)

From: Alberto González Palomo <alberto.att.matracas.org>
Date: Fri, 6 Oct 2017 15:57:09 +0200

   (Sorry for duplication: hit Reply instead of Reply-list)

   In brief: simplest way is to undo this change, patch attached.

   The current situation is that I proposed two alternatives for Scintilla:

   - revert CARETSTYLE_BLOCK to the way it was before, and add
CARETSTYLE_END.
     In Textadept, original and new (Vim) behaviour:
     Org: buffer.caret_style = buffer.CARETSTYLE_BLOCK
     Vim: buffer.caret_style = buffer.CARETSTYLE_BLOCK +
buffer.CARETSTYLE_INCLUSIVE

   - two disjoint values, with explicit names from Vim [1]
     Org: buffer.caret_style = buffer.CARETSTYLE_BLOCK_EXCLUSIVE
     Vim: buffer.caret_style = buffer.CARETSTYLE_BLOCK_INCLUSIVE

[1] http://vimhelp.appspot.com/options.txt.html#%27selection%27

   Both were rejected. https://sourceforge.net/p/scintilla/bugs/1924/

   The only acceptable patch would be adding CARETSTYLE_BLOCK_INCLUSIVE:
   Org: buffer.caret_style = buffer.CARETSTYLE_BLOCK_EXCLUSIVE
   Vim: buffer.caret_style = buffer.CARETSTYLE_BLOCK

   This means I would have to change my configuration file anyway and it
would work differently between versions of Textadept. The idea is to
have the same cursor style in both GUI and console.
   We would have to change it also in Scinterm:
https://foicica.com/hg/scinterm/file/30bef4e18cae/ScintillaTerm.cxx#l967

   For me the simplest solution is to undo the original commit:
https://sourceforge.net/p/scintilla/code/ci/d29f1dad85ac3ec2a57c9341c5bd62a05c07d1e0/

   I've tried to prepare a patch for Textadept, maybe modifying
"src/scintilla.patch" or adding another one in
"src/scintilla_backports", but when building Textadept from the HG repo
the existing patches do not apply cleanly:
./scintilla/cocoa/ScintillaCocoa.h.rej
./scintilla/doc/ScintillaHistory.html.rej
./scintilla/lexers/LexPython.cxx.rej
./scintilla/lexlib/CharacterCategory.cxx.rej
./scintilla/win32/ScintillaWin.cxx.rej

   Anyway, I attach a patch file for "src/scintilla.patch".
   After applying it, both the GTK and curses versions compile and run
as expected: https://foicica.com/textadept/manual.html#Compiling

cd src/
patch -p 1 scintilla.patch <patch-for-scintilla.patch
make deps NIGHTLY=1; make; make curses

   I get three warnings about unused return values from freopen(),
getcwd(), and chdir(), but that's all.
gcc version 5.4.0 20160609 (Ubuntu 5.4.0-6ubuntu1~16.04.4)

   Cheers,

-- 
     Alberto González Palomo
     Toledo, España / Saarbrücken, Deutschland
     https://www.matracas.org

-- 
You are subscribed to code.att.foicica.com.
To change subscription settings, send an e-mail to code+help.att.foicica.com.
To unsubscribe, send an e-mail to code+unsubscribe.att.foicica.com.
Received on Fri 06 Oct 2017 - 09:57:09 EDT

This archive was generated by hypermail 2.2.0 : Sat 07 Oct 2017 - 06:46:12 EDT