Removing the VIM browse patch.
The general reasoning is that the vim browse patch is very invasive, has a high level of complexity, and is incompatible with a significant number of other patches and it complicates further maintenance. Additionally the patch has its own scrollback mechanism which seemingly did not work properly - and nobody seems to have complained about this since the patch was added back in May 2021. If you want to try out the vim browse patch then I would recommend having a play around with the patch author's own build that has this patch integrated: - https://github.com/juliusHuelsmann/st-history-vim - https://github.com/juliusHuelsmann/st Alternatively a tag has been added to this repository that refers to the last commit that still has the vim browse patch: - https://github.com/bakkeby/st-flexipatch/tree/VIM_BROWSE_PATCH
This commit is contained in:
parent
340caa5d0a
commit
e88f2bf20c
13 changed files with 40 additions and 938 deletions
|
|
@ -1,13 +1,9 @@
|
|||
#if SCROLLBACK_PATCH && !VIM_BROWSE_PATCH
|
||||
#if SCROLLBACK_PATCH
|
||||
#define TLINEURL(y) TLINE(y)
|
||||
#else
|
||||
#define TLINEURL(y) term.line[y]
|
||||
#endif // SCROLLBACK_PATCH
|
||||
|
||||
#if VIM_BROWSE_PATCH
|
||||
extern int buffCols;
|
||||
#endif // VIM_BROWSE_PATCH
|
||||
|
||||
int url_x1, url_y1, url_x2, url_y2 = -1;
|
||||
int url_draw, url_click, url_maxcol;
|
||||
|
||||
|
|
@ -27,13 +23,11 @@ isvalidurlchar(Rune u)
|
|||
static int
|
||||
findeowl(int row)
|
||||
{
|
||||
#if VIM_BROWSE_PATCH
|
||||
int col = buffCols - 1;
|
||||
#elif COLUMNS_PATCH
|
||||
#if COLUMNS_PATCH
|
||||
int col = term.maxcol - 1;
|
||||
#else
|
||||
int col = term.col - 1;
|
||||
#endif // VIM_BROWSE_PATCH
|
||||
#endif // COLUMNS_PATCH
|
||||
|
||||
do {
|
||||
if (TLINEURL(row)[col].mode & ATTR_WRAP)
|
||||
|
|
@ -58,7 +52,7 @@ detecturl(int col, int row, int draw)
|
|||
int row_start = row;
|
||||
int col_start = col;
|
||||
int i = sizeof(url)/2+1, j = sizeof(url)/2;
|
||||
#if SCROLLBACK_PATCH && !VIM_BROWSE_PATCH
|
||||
#if SCROLLBACK_PATCH
|
||||
int minrow = term.scr - term.histn, maxrow = term.scr + term.row - 1;
|
||||
/* Fixme: MODE_ALTSCREEN is not defined here, I had to use the magic number 1<<2 */
|
||||
if ((term.mode & (1 << 2)) != 0)
|
||||
|
|
@ -96,13 +90,11 @@ detecturl(int col, int row, int draw)
|
|||
url_maxcol = MAX(url_maxcol, x2);
|
||||
url[j++] = TLINEURL(row)[col].u;
|
||||
wrapped = TLINEURL(row)[col].mode & ATTR_WRAP;
|
||||
#if VIM_BROWSE_PATCH
|
||||
if (++col >= buffCols || wrapped) {
|
||||
#elif COLUMNS_PATCH
|
||||
#if COLUMNS_PATCH
|
||||
if (++col >= term.maxcol || wrapped) {
|
||||
#else
|
||||
if (++col >= term.col || wrapped) {
|
||||
#endif // VIM_BROWSE_PATCH
|
||||
#endif // COLUMNS_PATCH
|
||||
col = 0;
|
||||
if (++row > maxrow || !wrapped)
|
||||
break;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue