ed_next_char(): * Move to the right one character * [^F] [^F] */
| 276 | * [^F] [^F] |
| 277 | */ |
| 278 | protected el_action_t |
| 279 | /*ARGSUSED*/ |
| 280 | ed_next_char(EditLine *el, Int c __attribute__((__unused__))) |
| 281 | { |
| 282 | Char *lim = el->el_line.lastchar; |
| 283 | |
| 284 | if (el->el_line.cursor >= lim || |
| 285 | (el->el_line.cursor == lim - 1 && |
| 286 | el->el_map.type == MAP_VI && |
| 287 | el->el_chared.c_vcmd.action == NOP)) |
| 288 | return CC_ERROR; |
| 289 | |
| 290 | el->el_line.cursor += el->el_state.argument; |
| 291 | if (el->el_line.cursor > lim) |
| 292 | el->el_line.cursor = lim; |
| 293 | |
| 294 | if (el->el_map.type == MAP_VI) |
| 295 | if (el->el_chared.c_vcmd.action != NOP) { |
| 296 | cv_delfini(el); |
| 297 | return CC_REFRESH; |
| 298 | } |
| 299 | return CC_CURSOR; |
| 300 | } |
| 301 | |
| 302 | |
| 303 | /* ed_prev_word(): |
no test coverage detected