diff -urN edit_PREV/ChangeLog edit/ChangeLog
old
|
new
|
|
| 1 | 2009-03-17 Vit Rosin <vit_r@list.ru> |
| 2 | |
| 3 | * edit.c (edit_insert_file): Place cursor after inserted chars. |
| 4 | |
1 | 5 | 2007-11-02 Vladimir Nadvornik <nadvornik@suse.cz> |
2 | 6 | |
3 | 7 | * editlock.c (lock_build_name): Check the return value of getpwuid(). |
diff -urN edit_PREV/edit.c edit/edit.c
old
|
new
|
|
267 | 267 | char *p; |
268 | 268 | if ((p = edit_get_filter (filename))) { |
269 | 269 | FILE *f; |
270 | | long current = edit->curs1; |
271 | 270 | f = (FILE *) popen (p, "r"); |
272 | 271 | if (f) { |
273 | 272 | edit_insert_stream (edit, f); |
274 | | edit_cursor_move (edit, current - edit->curs1); |
275 | 273 | if (pclose (f) > 0) { |
276 | 274 | GString *errmsg = g_string_new (NULL); |
277 | 275 | g_string_sprintf (errmsg, _(" Error reading from pipe: %s "), p); |
… |
… |
|
291 | 289 | g_free (p); |
292 | 290 | } else { |
293 | 291 | int i, file, blocklen; |
294 | | long current = edit->curs1; |
295 | 292 | unsigned char *buf; |
296 | 293 | if ((file = mc_open (filename, O_RDONLY | O_BINARY)) == -1) |
297 | 294 | return 0; |
… |
… |
|
300 | 297 | for (i = 0; i < blocklen; i++) |
301 | 298 | edit_insert (edit, buf[i]); |
302 | 299 | } |
303 | | edit_cursor_move (edit, current - edit->curs1); |
304 | 300 | g_free (buf); |
305 | 301 | mc_close (file); |
306 | 302 | if (blocklen) |