Lines Matching refs:cursor

214     shell->cursor = 0;  in BShellEnvHandleEnter()
250 if (shell->cursor == shell->length) { in BShellEnvHandleBackspace()
252 shell->cursor--; in BShellEnvHandleBackspace()
255 } else if (shell->cursor > 0) { in BShellEnvHandleBackspace()
256 for (short i = 0; i < shell->length - shell->cursor; i++) { in BShellEnvHandleBackspace()
257 shell->buffer[shell->cursor + i - 1] = shell->buffer[shell->cursor + i]; in BShellEnvHandleBackspace()
260 shell->cursor--; in BShellEnvHandleBackspace()
263 for (short i = shell->cursor; i < shell->length; i++) { in BShellEnvHandleBackspace()
267 for (short i = shell->length - shell->cursor + 1; i > 0; i--) { in BShellEnvHandleBackspace()
288 if (shell->length == shell->cursor) { in BShellEnvHandleNormal()
290 shell->cursor++; in BShellEnvHandleNormal()
293 for (uint16_t i = shell->length - shell->cursor; i > 0; i--) { in BShellEnvHandleNormal()
294 shell->buffer[shell->cursor + i] = shell->buffer[shell->cursor + i - 1]; in BShellEnvHandleNormal()
296 shell->buffer[shell->cursor++] = data; in BShellEnvHandleNormal()
298 for (uint16_t i = shell->cursor - 1; i < shell->length; i++) { in BShellEnvHandleNormal()
301 for (uint16_t i = shell->length - shell->cursor; i > 0; i--) { in BShellEnvHandleNormal()
309 shell->cursor = shell->length; in BShellEnvHandleNormal()
373 if (shell->cursor < shell->length) { in BShellEnvProcessInput()
374 BShellEnvOutputByte(handle, shell->buffer[shell->cursor]); in BShellEnvProcessInput()
375 shell->cursor++; in BShellEnvProcessInput()
379 if (shell->cursor > 0) { in BShellEnvProcessInput()
381 shell->cursor--; in BShellEnvProcessInput()
418 shell->cursor = 0; in BShellEnvInit()