MCPcopy Create free account
hub / github.com/FirebirdSQL/firebird / vi_change_case

Function vi_change_case

extern/editline/src/vi.c:247–271  ·  view source on GitHub ↗

vi_change_case(): * Vi change case of character under the cursor and advance one character * [~] */

Source from the content-addressed store, hash-verified

245 * [~]
246 */
247protected el_action_t
248vi_change_case(EditLine *el, Int c)
249{
250 int i;
251
252 if (el->el_line.cursor >= el->el_line.lastchar)
253 return CC_ERROR;
254 cv_undo(el);
255 for (i = 0; i < el->el_state.argument; i++) {
256
257 c = *el->el_line.cursor;
258 if (Isupper(c))
259 *el->el_line.cursor = Tolower(c);
260 else if (Islower(c))
261 *el->el_line.cursor = Toupper(c);
262
263 if (++el->el_line.cursor >= el->el_line.lastchar) {
264 el->el_line.cursor--;
265 re_fastaddc(el);
266 break;
267 }
268 re_fastaddc(el);
269 }
270 return CC_NORM;
271}
272
273
274/* vi_change_meta():

Callers

nothing calls this directly

Calls 2

cv_undoFunction · 0.85
re_fastaddcFunction · 0.85

Tested by

no test coverage detected