Regular Expression in countColumn method

CountColumn() method is mainly used to count number of text for indentation.
Then indentation is only created by half-width space or tab.
But regular expression in countColumn() method also counts spaces other than half-width space or tab.

In my case:

I want to write \u3000(full-width space) on head of all lines when writing Japanese text.
\u3000 is included in \s.
For the reason, CodeMirror indents next line for half-width space.
However that I need is No-indent or Full-width space indent.

I suppose that appropriate regular expression is /[^\u0020\u00a0\t]/

Is there any other way?

Thank you.

CodeMirror’s indentation system is written with only (Latin) spaces and tabs in mind. I suspect adjusting it to do something sensible with Japanese spacing would require a lot more than just adjusting this regexp. So I’d advise you to avoid using the built-in indentation handling and write your own command to bind to Enter.

Thanks for your reply.
Following your advice, I built my own indentation handling and bind it to Enter. It’s just ok.
Although I had a little difficulty writing because most methods were private.

I have another idea.
When user uses prev mode, indentation should be calculated like belows:
if (pos < indentation) indentString += getLine(doc, n-1).text.match(/^\s*/)[0]
Because spaces is got like belows:
var curSpaceString = line.text.match(/^\s*/)[0], indentation;
I think these sentense should use same regexp.

Sorry for ranting.
I understand what you mean.
I’m glad if you consider not-Latin languages someday!