diff --git a/src/kilo.c b/src/kilo.c index 85ace88..7349537 100644 --- a/src/kilo.c +++ b/src/kilo.c @@ -673,7 +673,7 @@ static void editorMenu(void) { draw_menu_item("^g", "go"); draw_menu_item("^b", "big picture"); draw_menu_item("^f", "find"); - draw_menu_item("^/", "(un)comment line"); + draw_menu_item("^/|^-|^_", "(un)comment line"); draw_menu_item("^h", "back up cursor"); draw_menu_item("^l", "end of line"); attrset(A_NORMAL); @@ -1145,7 +1145,7 @@ static void editorProcessKeypress(lua_State* L) { editorDelChar(); } break; - case CTRL_SLASH: + case CTRL_SLASH: /* same as CTRL_UNDERSCORE */ if (starts_with(E.row[E.rowoff+E.cy].chars, "--? ")) editorUncommentCursorRow(); else diff --git a/src/teliva.h b/src/teliva.h index 0f78bde..772f17a 100644 --- a/src/teliva.h +++ b/src/teliva.h @@ -21,6 +21,7 @@ enum KEY_ACTION { CTRL_U = 21, CTRL_X = 24, CTRL_SLASH = 31, + CTRL_UNDERSCORE = 31, DELETE = 127, };