cmdbuf.c (a5f0fb151d90effe79714de0fa059954725fe57f) cmdbuf.c (c9346414d95d69f958210e825deb3b086dac3529)
1/*
2 * Copyright (C) 1984-2000 Mark Nudelman
3 *
4 * You may distribute under the terms of either the GNU General Public
5 * License or the Less License, as specified in the README file.
6 *
7 * For more information about less, or for information on how to
8 * contact the author, see the README file.

--- 141 unchanged lines hidden (view full) ---

150
151 /*
152 * Repaint the line from the current position.
153 */
154 clear_eol();
155 for ( ; *cp != '\0'; cp++)
156 {
157 p = prchar(*cp);
1/*
2 * Copyright (C) 1984-2000 Mark Nudelman
3 *
4 * You may distribute under the terms of either the GNU General Public
5 * License or the Less License, as specified in the README file.
6 *
7 * For more information about less, or for information on how to
8 * contact the author, see the README file.

--- 141 unchanged lines hidden (view full) ---

150
151 /*
152 * Repaint the line from the current position.
153 */
154 clear_eol();
155 for ( ; *cp != '\0'; cp++)
156 {
157 p = prchar(*cp);
158 if (cmd_col + strlen(p) >= sc_width)
158 if (cmd_col + (int)strlen(p) >= sc_width)
159 break;
160 putstr(p);
161 cmd_col += strlen(p);
162 }
163
164 /*
165 * Back up the cursor to the correct position.
166 */

--- 83 unchanged lines hidden (view full) ---

250 if (*cp == '\0')
251 {
252 /*
253 * Already at the end of the line.
254 */
255 return (CC_OK);
256 }
257 p = prchar(*cp);
159 break;
160 putstr(p);
161 cmd_col += strlen(p);
162 }
163
164 /*
165 * Back up the cursor to the correct position.
166 */

--- 83 unchanged lines hidden (view full) ---

250 if (*cp == '\0')
251 {
252 /*
253 * Already at the end of the line.
254 */
255 return (CC_OK);
256 }
257 p = prchar(*cp);
258 if (cmd_col + strlen(p) >= sc_width)
258 if (cmd_col + (int)strlen(p) >= sc_width)
259 cmd_lshift();
259 cmd_lshift();
260 else if (cmd_col + strlen(p) == sc_width - 1 && cp[1] != '\0')
260 else if (cmd_col + (int)strlen(p) == sc_width - 1 && cp[1] != '\0')
261 cmd_lshift();
262 cp++;
263 putstr(p);
264 cmd_col += strlen(p);
265 return (CC_OK);
266}
267
268/*

--- 5 unchanged lines hidden (view full) ---

274 char *p;
275
276 if (cp <= cmdbuf)
277 {
278 /* Already at the beginning of the line */
279 return (CC_OK);
280 }
281 p = prchar(cp[-1]);
261 cmd_lshift();
262 cp++;
263 putstr(p);
264 cmd_col += strlen(p);
265 return (CC_OK);
266}
267
268/*

--- 5 unchanged lines hidden (view full) ---

274 char *p;
275
276 if (cp <= cmdbuf)
277 {
278 /* Already at the beginning of the line */
279 return (CC_OK);
280 }
281 p = prchar(cp[-1]);
282 if (cmd_col < prompt_col + strlen(p))
282 if (cmd_col < prompt_col + (int)strlen(p))
283 cmd_rshift();
284 cp--;
285 cmd_col -= strlen(p);
286 while (*p++ != '\0')
287 putbs();
288 return (CC_OK);
289}
290

--- 732 unchanged lines hidden ---
283 cmd_rshift();
284 cp--;
285 cmd_col -= strlen(p);
286 while (*p++ != '\0')
287 putbs();
288 return (CC_OK);
289}
290

--- 732 unchanged lines hidden ---