Source Insight 宏实现移动光标到行首或行尾

来源:互联网 发布:迷糊娃娃淘宝价 编辑:程序博客网 时间:2024/06/07 20:36

/* *@author: citongke1 *@brief 移动光标到行首 */macro MoveHome(){hwnd = GetCurrentWnd(); hbuf = GetCurrentBuf(); if (hbuf == 0) stop;   // empty buffer ln = GetBufLnCur(hbuf); ipos = 0;SetBufIns(hbuf, ln, ipos); }/* *@author: citongke1 *@brief 移动光标到行尾 */macro MoveEnd(){hwnd = GetCurrentWnd(); hbuf = GetCurrentBuf(); if (hbuf == 0) stop;   // empty buffer ln = GetBufLnCur(hbuf); //ipos = GetWndSelIchFirst(hwnd);//获取当前光标位置text = GetBufLine(hbuf, ln);ipos = strlen(text);SetBufIns(hbuf, ln, ipos);}


0 0
原创粉丝点击