MCPcopy Index your code
hub / github.com/ChinaSiro/claude-code-sourcemap / $c8

Function $c8

package/cli.js:8058–8059  ·  view source on GitHub ↗
(q,K)

Source from the content-addressed store, hash-verified

8056`),{line:$}=_.cursor.getPosition(),A=Math.min(K,Y.length-$),O=" ";for(let J=0;J<A;J++){let M=$+J,X=Y[M]??"";if(q===">")Y[M]=" "+X;else if(X.startsWith(" "))Y[M]=X.slice(2);else if(X.startsWith("\t"))Y[M]=X.slice(1);else{let P=0,W=0;while(W<X.length&&P<2&&/\s/.test(X[W]))P++,W++;Y[M]=X.slice(W)}}let w=Y.join(`
8057`),H=((Y[$]??"").match(/^\s*/)?.[0]??"").length;_.setText(w),_.setOffset($c8(Y,$)+H),_.recordChange({type:"indent",dir:q,count:K})}function S48(q,K){let z=K.text.split(`
8058`),{line:Y}=K.cursor.getPosition(),$=q==="below"?Y+1:Y,A=[...z.slice(0,$),"",...z.slice($)],O=A.join(`
8059`);K.setText(O),K.enterInsert($c8(A,$)),K.recordChange({type:"openLine",direction:q})}function $c8(q,K){return q.slice(0,K).join(`
8060`).length+(K>0?1:0)}function dY7(q,K,_,z,Y){let $=Math.min(q.offset,K.offset),A=Math.max(q.offset,K.offset),O=!1;if(z==="change"&&(_==="w"||_==="W")){let w=q;for(let H=0;H<Y-1;H++)w=_==="w"?w.nextVimWord():w.nextWORD();let j=_==="w"?w.endOfVimWord():w.endOfWORD();A=q.measuredText.nextOffset(j.offset)}else if(UnK(_)){O=!0;let w=q.text,j=w.indexOf(`
8061`,A);if(j===-1){if(A=w.length,$>0&&w[$-1]===`
8062`)$-=1}else A=j+1}else if(FnK(_)&&q.offset<=K.offset)A=q.measuredText.nextOffset(A);return $=q.snapOutOfImageRef($,"start"),A=q.snapOutOfImageRef(A,"end"),{from:$,to:A,linewise:O}}function qFY(q,K,_){let z=Math.min(q.offset,K.offset),Y=Math.max(q.offset,K.offset),$=q.measuredText.nextOffset(Y);return{from:z,to:$}}function C48(q,K,_,z,Y=!1){let $=z.text.slice(K,_);if(Y&&!$.endsWith(`

Callers 4

zc8Function · 0.85
lnKFunction · 0.85
Yc8Function · 0.85
S48Function · 0.85

Calls 2

joinMethod · 0.45
sliceMethod · 0.45

Tested by

no test coverage detected