← Commit list

d3dff879f

Denys Vlasenko
Denys Vlasenko
2012-06-11
FAILED Duration: 254s

Subject

vi: save/restore screen upon invocation

Binary

No binary (build failed)

Architecture & Compiler Flags

Architecture: x86_64-linux-gnu Compiler: gcc (Ubuntu 11.4.0-1ubuntu1~22.04.3) 11.4.0

—

Build Log

(log yok)

Commit Diff GitHub →

editors/vi.c+4 -0
@@ -598,11 +598,15 @@ int vi_main(int argc, char **argv)
//----- This is the main file handling loop --------------
save_argc = argc;
optind = 0;
+ // "Save cursor, use alternate screen buffer, clear screen"
+ write1("\033[?1049h");
while (1) {
edit_file(argv[optind]); /* param might be NULL */
if (++optind >= argc)
break;
}
+ // "Use normal screen buffer, restore cursor"
+ write1("\033[?1049l");
//-----------------------------------------------------------
return 0;