[BUG] vi misbehaves on pasted text

Cristian Ionescu-Idbohrn cristian.ionescu-idbohrn at axis.com
Mon Jun 11 18:17:19 UTC 2012


On Mon, 11 Jun 2012, Denys Vlasenko wrote:
>
> I checked what ncurses uses, and it seems that vi can be made to do
> the same with these two write1() calls in vi_main():
>
>         // "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");
>
> I think we can risk using it.

Shouldn't these be also nuked?

./configs/TEST_nommu_defconfig:344:CONFIG_FEATURE_VI_OPTIMIZE_CURSOR=y
./configs/TEST_noprintf_defconfig:349:# CONFIG_FEATURE_VI_OPTIMIZE_CURSOR is not set
./configs/TEST_rh9_defconfig:361:CONFIG_FEATURE_VI_OPTIMIZE_CURSOR=y
./configs/android2_defconfig:366:# CONFIG_FEATURE_VI_OPTIMIZE_CURSOR is not set
./configs/android_defconfig:389:CONFIG_FEATURE_VI_OPTIMIZE_CURSOR=y
./configs/android_ndk_defconfig:374:CONFIG_FEATURE_VI_OPTIMIZE_CURSOR=y
./configs/cygwin_defconfig:366:CONFIG_FEATURE_VI_OPTIMIZE_CURSOR=y
./configs/freebsd_defconfig:370:CONFIG_FEATURE_VI_OPTIMIZE_CURSOR=y


Cheers,

-- 
Cristian


More information about the busybox mailing list