static void WCEL_KillFromBegOfLine(WCEL_Context* ctx) { if (ctx->ofs) { WCEL_SaveYank(ctx, 0, ctx->ofs); WCEL_DeleteString(ctx, 0, ctx->ofs); ctx->ofs = 0; } }
static void WCEL_CopyMarkedZone(WCEL_Context* ctx) { unsigned beg, end; if (ctx->mark > ctx->len || ctx->mark == ctx->ofs) return; if (ctx->mark > ctx->ofs) { beg = ctx->ofs; end = ctx->mark; } else { beg = ctx->mark; end = ctx->ofs; } WCEL_SaveYank(ctx, beg, end); }
static void WCEL_KillMarkedZone(WCEL_Context* ctx) { unsigned beg, end; if (ctx->mark > ctx->len || ctx->mark == ctx->ofs) return; if (ctx->mark > ctx->ofs) { beg = ctx->ofs; end = ctx->mark; } else { beg = ctx->mark; end = ctx->ofs; } WCEL_SaveYank(ctx, beg, end); WCEL_DeleteString(ctx, beg, end); ctx->ofs = beg; }
static void WCEL_KillToEndOfLine(WCEL_Context* ctx) { WCEL_SaveYank(ctx, ctx->ofs, ctx->len); WCEL_DeleteString(ctx, ctx->ofs, ctx->len); }