Compare commits
3 commits
d077f80d05
...
c463a37179
| Author | SHA1 | Date | |
|---|---|---|---|
| c463a37179 | |||
| a7df06da8b | |||
| 32819ff952 |
2 changed files with 10 additions and 3 deletions
|
|
@ -158,8 +158,8 @@ pub fn codepointFromButton(b: wio.Button, mods: Mods) u21 {
|
||||||
}
|
}
|
||||||
|
|
||||||
pub const mouse_button_left: u8 = 0;
|
pub const mouse_button_left: u8 = 0;
|
||||||
pub const mouse_button_right: u8 = 1;
|
pub const mouse_button_middle: u8 = 1;
|
||||||
pub const mouse_button_middle: u8 = 2;
|
pub const mouse_button_right: u8 = 2;
|
||||||
|
|
||||||
pub fn mouseButtonId(b: wio.Button) ?u8 {
|
pub fn mouseButtonId(b: wio.Button) ?u8 {
|
||||||
return switch (b) {
|
return switch (b) {
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,5 @@
|
||||||
const std = @import("std");
|
const std = @import("std");
|
||||||
const builtin = @import("builtin");
|
const builtin = @import("builtin");
|
||||||
const build_options = @import("build_options");
|
|
||||||
const Allocator = std.mem.Allocator;
|
const Allocator = std.mem.Allocator;
|
||||||
|
|
||||||
const tp = @import("thespian");
|
const tp = @import("thespian");
|
||||||
|
|
@ -74,6 +73,8 @@ pub fn create(allocator: Allocator, parent: Plane, ctx: command.Context) !Widget
|
||||||
pub fn run_cmd(self: *Self, ctx: command.Context) !void {
|
pub fn run_cmd(self: *Self, ctx: command.Context) !void {
|
||||||
var env = try std.process.getEnvMap(self.allocator);
|
var env = try std.process.getEnvMap(self.allocator);
|
||||||
errdefer env.deinit();
|
errdefer env.deinit();
|
||||||
|
if (env.get("TERM") == null)
|
||||||
|
try env.put("TERM", "xterm-256color");
|
||||||
|
|
||||||
var cmd_arg: []const u8 = "";
|
var cmd_arg: []const u8 = "";
|
||||||
var on_exit: TerminalOnExit = tui.config().terminal_on_exit;
|
var on_exit: TerminalOnExit = tui.config().terminal_on_exit;
|
||||||
|
|
@ -387,6 +388,12 @@ pub fn render(self: *Self, theme: *const Widget.Theme) bool {
|
||||||
std.log.err("terminal_view: draw failed: {}", .{e});
|
std.log.err("terminal_view: draw failed: {}", .{e});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
if (!software_cursor and self.focused and tui.terminal_has_focus()) {
|
||||||
|
const scr = &tui.rdr().vx.screen;
|
||||||
|
if (scr.cursor_vis)
|
||||||
|
tui.rdr().cursor_enable(@intCast(scr.cursor.row), @intCast(scr.cursor.col), scr.cursor_shape) catch {};
|
||||||
|
}
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue