mirror of
https://github.com/ultimatepp/ultimatepp.git
synced 2026-08-11 22:03:09 -06:00
A++ fix (Alt+I not working)
git-svn-id: svn://ultimatepp.org/upp/trunk@670 f0d560ea-af0d-0410-9eb7-867de7ffcac7
This commit is contained in:
parent
5a0bedd65a
commit
06d4c2dbb4
2 changed files with 5 additions and 2 deletions
|
|
@ -133,12 +133,14 @@ void AssistEditor::DirtyFrom(int line)
|
|||
int AssistEditor::Ch(int i)
|
||||
{
|
||||
if(i >= 0 && i < GetLength()) {
|
||||
if(i < cachedpos || i - cachedpos >= cachedline.GetCount()) {
|
||||
if(i < cachedpos || i - cachedpos > cachedline.GetCount()) {
|
||||
cachedln = GetLine(i);
|
||||
cachedline = GetWLine(cachedln);
|
||||
cachedpos = GetPos(cachedln);
|
||||
DDUMP(cachedline);
|
||||
}
|
||||
return cachedline[i - cachedpos];
|
||||
i -= cachedpos;
|
||||
return i < cachedline.GetCount() ? cachedline[i] : '\n';
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -208,6 +208,7 @@ void AssistEditor::SwapSContext(Parser& p)
|
|||
else
|
||||
for(;;) {
|
||||
int c = Ch(i);
|
||||
DDUMP((char)c);
|
||||
if(c == '{') {
|
||||
i++;
|
||||
break;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue