-
Notifications
You must be signed in to change notification settings - Fork 109
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Adding reflow patch #120
Adding reflow patch #120
Conversation
Now that the reflow and improved keyboard select patches are moving to st-flexipatch, st-sx has very little reason to exist anymore unless I implement the kitty image protocol as well. lol But we're not there yet because I found the following issues in this PR:
diff --git a/patch/keyboardselect_reflow_st.c b/patch/keyboardselect_reflow_st.c
index e6b8364..57bfedc 100644
--- a/patch/keyboardselect_reflow_st.c
+++ b/patch/keyboardselect_reflow_st.c
@@ -193,6 +193,10 @@ kbds_copytoclipboard(void)
selextend(kbds_c.x, kbds_c.y, kbds_seltype, 1);
}
xsetsel(getsel());
+
+ #if !CLIPBOARD_PATCH
+ xclipcopy();
+ #endif // !CLIPBOARD_PATCH
}
void |
I'll look into the sixels disappearing from scrollback.
I would disagree :). I see it as a fine example implementation. Due to the general approach st-flexipatch is inevitably a platter of spaghetti code and having a dedicated build sounds more fun to work with. Maybe that will inspire me to roll my own at some point. |
I just noticed that neither the reflow patch nor st-sx use the ATTR_SELECTED attribute. The attribute came from the scrollback-reflow patch, but it's unused there as well. So, you might want to remove the REFLOW_PATCH condition here to avoid confusion: #if SELECTION_COLORS_PATCH || REFLOW_PATCH
ATTR_SELECTED = 1 << 12,
#endif // SELECTION_COLORS_PATCH | REFLOW_PATCH |
Done. Thanks for noticing. |
… scrollback patch, so include the mouse bindings as well.
This seems stable enough. I tried with a combination of alpha, anysize, boxdraw, clipboard, keyboardselect, ligatures, reflow, scrollback, selection colors, sixel, vertcenter and wide glyphs patches and I didn't run into any compilation errors or the terminal misbehaving. I am aware that the keyboard select patch is not actually reflow specific; it is more of an upgrade (or it could be considered as a different patch variant). Didn't want to invest time in backporting that to work with pre-reflow resizing and scrollback behaviour hence added it as a reflow specific option. Going to go forward and merge this. |
Technically, it should be compatible, with minor changes, with the scrollback patch, since they use a very similar scrollback structure with the reflow. In fact, I wrote an early version of the improved variant to work with the scrollback patch. So, if there is demand, I can take a look at it too. |
This adds the reflow "patch" based on @veltza's implementation.
Closes #34