Skip to content

Commit

Permalink
kill unneeded assignments
Browse files Browse the repository at this point in the history
  • Loading branch information
jorisvink committed Sep 30, 2024
1 parent 0652d8e commit c8b949e
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 7 deletions.
2 changes: 0 additions & 2 deletions buffer.c
Original file line number Diff line number Diff line change
Expand Up @@ -799,8 +799,6 @@ ce_buffer_word_erase(struct cebuf *buf)
ce_buffer_line_allocate(buf, line);

buf->loff = start;

ptr = line->data;
for (idx = 0; idx < chars; idx++)
buffer_line_erase_character(buf, line, 1);

Expand Down
2 changes: 0 additions & 2 deletions editor.c
Original file line number Diff line number Diff line change
Expand Up @@ -1542,15 +1542,13 @@ editor_cmdbuf_input(struct cebuf *buf, u_int8_t key)
editor_cmd_history_cycle(0, extcmd);
break;
case EDITOR_CMD_HIST_NEXT:
ptr = buf->data;
if (histlen > 0) {
hist = ce_hist_lookup(histcmd, histlen, 0);
if (hist == NULL)
hist = ce_hist_current();
}
break;
case EDITOR_CMD_HIST_PREV:
ptr = buf->data;
if (histlen > 0) {
hist = ce_hist_lookup(histcmd, histlen, 1);
if (hist == NULL)
Expand Down
4 changes: 1 addition & 3 deletions syntax.c
Original file line number Diff line number Diff line change
Expand Up @@ -376,8 +376,6 @@ ce_syntax_write(struct cebuf *buf, struct celine *line, size_t index,
syntax_state.off++;
break;
default:
spaces = syntax_state.off;

syntax_state.p = &p[syntax_state.off];
syntax_state.len = towrite - syntax_state.off;

Expand Down Expand Up @@ -963,7 +961,7 @@ syntax_highlight_python_multiline_string(struct state *state)
if (state->inside_string == 0) {
if (hit) {
state->inside_string = 0xff;
syntax_state_color(state, SYNTAX_COLOR_COMMENT);
syntax_state_color(state, SYNTAX_COLOR_RED);
syntax_write(state, 3);
return (0);
}
Expand Down

0 comments on commit c8b949e

Please sign in to comment.