diff --git a/src/viewer/actions_cmd.c b/src/viewer/actions_cmd.c
index 87743fb8b..0bcfe1b94 100644
a
|
b
|
mcview_hook (void *v) |
189 | 189 | { |
190 | 190 | WView *view = (WView *) v; |
191 | 191 | WPanel *panel; |
| 192 | const char* path = NULL; |
| 193 | const vfs_path_t *vfile = NULL; |
192 | 194 | |
193 | 195 | /* If the user is busy typing, wait until he finishes to update the |
194 | 196 | screen */ |
… |
… |
mcview_hook (void *v) |
210 | 212 | |
211 | 213 | mcview_done (view); |
212 | 214 | mcview_init (view); |
213 | | mcview_load (view, 0, panel->dir.list[panel->selected].fname, 0, 0, 0); |
| 215 | path = panel->dir.list[panel->selected].fname; |
| 216 | vfile = vfs_path_from_str(path); |
| 217 | if (regex_command_for (view, vfile, "View", NULL) == 0) |
| 218 | mcview_load (view, NULL, path, 0, 0, 0); |
214 | 219 | mcview_display (view); |
215 | 220 | } |
216 | 221 | |
diff --git a/src/viewer/growbuf.c b/src/viewer/growbuf.c
index c1172b6d6..e9349f465 100644
a
|
b
|
mcview_growbuf_read_until (WView * view, off_t ofs) |
218 | 218 | return; |
219 | 219 | } |
220 | 220 | } |
221 | | else |
| 221 | else if (view->datasource == DS_VFS_PIPE) |
222 | 222 | { |
223 | | g_assert (view->datasource == DS_VFS_PIPE); |
224 | 223 | do |
225 | 224 | { |
226 | 225 | nread = mc_read (view->ds_vfs_pipe, p, bytesfree); |
… |
… |
mcview_growbuf_read_until (WView * view, off_t ofs) |
233 | 232 | return; |
234 | 233 | } |
235 | 234 | } |
| 235 | else |
| 236 | { |
| 237 | // Skip the rest of file |
| 238 | nread = bytesfree; |
| 239 | } |
236 | 240 | short_read = ((size_t) nread < bytesfree); |
237 | 241 | view->growbuf_lastindex += nread; |
238 | 242 | } |