Compare commits
6 Commits
v2.0.0
...
a011b57ce2
| Author | SHA1 | Date | |
|---|---|---|---|
|
a011b57ce2
|
|||
|
b1ee295345
|
|||
|
872f2d7c59
|
|||
|
f15d887dcd
|
|||
|
841bc00c51
|
|||
|
8afe4f8aad
|
2
NEWS
2
NEWS
@@ -16,7 +16,7 @@
|
|||||||
|
|
||||||
* xC: replaced behaviour.save_on_quit with general.autosave
|
* xC: replaced behaviour.save_on_quit with general.autosave
|
||||||
|
|
||||||
* xC: the server *.command configuration option now supports multiple lines
|
* xC: the servers.*.command configuration option now supports multiple lines
|
||||||
|
|
||||||
* xC: improved pager integration capabilities
|
* xC: improved pager integration capabilities
|
||||||
|
|
||||||
|
|||||||
2
liberty
2
liberty
Submodule liberty updated: f04cc2c61e...aacf1b1d47
18
xC.c
18
xC.c
@@ -1030,7 +1030,7 @@ input_el__save_buffer (struct input_el *self, struct input_el_buffer *buffer)
|
|||||||
int len = info->lastchar - info->buffer;
|
int len = info->lastchar - info->buffer;
|
||||||
int point = info->cursor - info->buffer;
|
int point = info->cursor - info->buffer;
|
||||||
|
|
||||||
wchar_t *line = calloc (sizeof *info->buffer, len + 1);
|
wchar_t *line = xcalloc (len + 1, sizeof *info->buffer);
|
||||||
memcpy (line, info->buffer, sizeof *info->buffer * len);
|
memcpy (line, info->buffer, sizeof *info->buffer * len);
|
||||||
el_cursor (self->editline, len - point);
|
el_cursor (self->editline, len - point);
|
||||||
el_wdeletestr (self->editline, len);
|
el_wdeletestr (self->editline, len);
|
||||||
@@ -1635,7 +1635,7 @@ static struct formatter
|
|||||||
formatter_make (struct app_context *ctx, struct server *s)
|
formatter_make (struct app_context *ctx, struct server *s)
|
||||||
{
|
{
|
||||||
struct formatter self = { .ctx = ctx, .s = s, .clean = true };
|
struct formatter self = { .ctx = ctx, .s = s, .clean = true };
|
||||||
self.items = xcalloc (sizeof *self.items, (self.items_alloc = 16));
|
self.items = xcalloc ((self.items_alloc = 16), sizeof *self.items);
|
||||||
return self;
|
return self;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -2567,7 +2567,7 @@ config_validate_nonnegative
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
static struct config_schema g_config_server[] =
|
static const struct config_schema g_config_server[] =
|
||||||
{
|
{
|
||||||
{ .name = "nicks",
|
{ .name = "nicks",
|
||||||
.comment = "IRC nickname",
|
.comment = "IRC nickname",
|
||||||
@@ -2664,7 +2664,7 @@ static struct config_schema g_config_server[] =
|
|||||||
{}
|
{}
|
||||||
};
|
};
|
||||||
|
|
||||||
static struct config_schema g_config_general[] =
|
static const struct config_schema g_config_general[] =
|
||||||
{
|
{
|
||||||
{ .name = "autosave",
|
{ .name = "autosave",
|
||||||
.comment = "Save configuration automatically after each change",
|
.comment = "Save configuration automatically after each change",
|
||||||
@@ -2772,7 +2772,7 @@ static struct config_schema g_config_general[] =
|
|||||||
{}
|
{}
|
||||||
};
|
};
|
||||||
|
|
||||||
static struct config_schema g_config_theme[] =
|
static const struct config_schema g_config_theme[] =
|
||||||
{
|
{
|
||||||
#define XX(x, y, z) { .name = #y, .comment = #z, .type = CONFIG_ITEM_STRING, \
|
#define XX(x, y, z) { .name = #y, .comment = #z, .type = CONFIG_ITEM_STRING, \
|
||||||
.on_change = on_config_theme_change },
|
.on_change = on_config_theme_change },
|
||||||
@@ -9306,7 +9306,7 @@ config_dump_item (struct config_item *item, struct config_dump_data *data)
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Currently there's no reason for us to dump unknown items
|
// Currently there's no reason for us to dump unknown items
|
||||||
struct config_schema *schema = item->schema;
|
const struct config_schema *schema = item->schema;
|
||||||
if (!schema)
|
if (!schema)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
@@ -13182,7 +13182,7 @@ try_handle_command_help_option (struct app_context *ctx, const char *name)
|
|||||||
if (!item)
|
if (!item)
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
struct config_schema *schema = item->schema;
|
const struct config_schema *schema = item->schema;
|
||||||
if (!schema)
|
if (!schema)
|
||||||
{
|
{
|
||||||
log_global_error (ctx, "#s: #s", "Option not recognized", name);
|
log_global_error (ctx, "#s: #s", "Option not recognized", name);
|
||||||
@@ -14757,7 +14757,7 @@ on_editline_return (EditLine *editline, int key)
|
|||||||
|
|
||||||
const LineInfoW *info = el_wline (editline);
|
const LineInfoW *info = el_wline (editline);
|
||||||
int len = info->lastchar - info->buffer;
|
int len = info->lastchar - info->buffer;
|
||||||
wchar_t *line = calloc (sizeof *info->buffer, len + 1);
|
wchar_t *line = xcalloc (len + 1, sizeof *info->buffer);
|
||||||
memcpy (line, info->buffer, sizeof *info->buffer * len);
|
memcpy (line, info->buffer, sizeof *info->buffer * len);
|
||||||
|
|
||||||
if (*line)
|
if (*line)
|
||||||
@@ -15913,7 +15913,7 @@ on_config_relay_bind_change (struct config_item *item)
|
|||||||
|
|
||||||
#ifdef TESTING
|
#ifdef TESTING
|
||||||
|
|
||||||
static struct config_schema g_config_test[] =
|
static const struct config_schema g_config_test[] =
|
||||||
{
|
{
|
||||||
{ .name = "foo", .type = CONFIG_ITEM_BOOLEAN, .default_ = "off" },
|
{ .name = "foo", .type = CONFIG_ITEM_BOOLEAN, .default_ = "off" },
|
||||||
{ .name = "bar", .type = CONFIG_ITEM_INTEGER, .default_ = "1" },
|
{ .name = "bar", .type = CONFIG_ITEM_INTEGER, .default_ = "1" },
|
||||||
|
|||||||
@@ -695,10 +695,8 @@ let Buffer = {
|
|||||||
dom.scrollTop + dom.clientHeight + 1 >= dom.scrollHeight
|
dom.scrollTop + dom.clientHeight + 1 >= dom.scrollHeight
|
||||||
|
|
||||||
let b = buffers.get(bufferCurrent)
|
let b = buffers.get(bufferCurrent)
|
||||||
if (b !== undefined && b.highlighted && !bufferAutoscroll) {
|
if (b !== undefined && b.highlighted && !bufferAutoscroll)
|
||||||
b.highlighted = false
|
b.highlighted = false
|
||||||
m.redraw()
|
|
||||||
}
|
|
||||||
}}, lines)
|
}}, lines)
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|||||||
9
xP/xP.go
9
xP/xP.go
@@ -75,12 +75,12 @@ func relayMakeReceiver(ctx context.Context, conn net.Conn) <-chan []byte {
|
|||||||
go func() {
|
go func() {
|
||||||
defer close(p)
|
defer close(p)
|
||||||
for {
|
for {
|
||||||
j := relayReadFrame(r)
|
b := relayReadFrame(r)
|
||||||
if j == nil {
|
if b == nil {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
select {
|
select {
|
||||||
case p <- j:
|
case p <- b:
|
||||||
case <-ctx.Done():
|
case <-ctx.Done():
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
@@ -145,8 +145,7 @@ func clientWriteError(ctx context.Context, ws *websocket.Conn, err error) bool {
|
|||||||
b, ok := (&RelayEventMessage{
|
b, ok := (&RelayEventMessage{
|
||||||
EventSeq: 0,
|
EventSeq: 0,
|
||||||
Data: RelayEventData{
|
Data: RelayEventData{
|
||||||
Interface: RelayEventDataError{
|
Variant: &RelayEventDataError{
|
||||||
Event: RelayEventError,
|
|
||||||
CommandSeq: 0,
|
CommandSeq: 0,
|
||||||
Error: err.Error(),
|
Error: err.Error(),
|
||||||
},
|
},
|
||||||
|
|||||||
Reference in New Issue
Block a user