Commit 174af6b7 authored by Jean-Francois Dockes's avatar Jean-Francois Dockes
Browse files

trying out tentative blind fix for pb 275

--HG--
branch : RECOLL_1_21_MAINT
parent 63ec3df1
......@@ -4,7 +4,7 @@
# For the kio: (and kdesdk?)
# sudo apt-get install pkg-kde-tools cdbs
RCLVERS=1.21.2
RCLVERS=1.21.3p1
LENSVERS=1.19.10.3543
SCOPEVERS=1.20.2.4
PPAVERS=1
......@@ -42,7 +42,7 @@ check_recoll_orig()
debdir=debian
# Note: no new releases for lucid: no webkit. Or use old debianrclqt4 dir.
series="precise trusty utopic vivid wily"
series=
#series=
if test "X$series" != X ; then
check_recoll_orig
......@@ -141,7 +141,7 @@ done
### Unity Scope
series="trusty utopic vivid"
series=wily
series=
debdir=debianunityscope
if test ! -d ${debdir}/ ; then
......
recoll (1.21.3-1~ppaPPAVERS~SERIES1) SERIES; urgency=low
* Fix webcache size being capped at 1 GB
-- Jean-Francois Dockes <jf@dockes.org> Sat, 31 Oct 2015 09:26:00 +0200
recoll (1.21.2-1~ppaPPAVERS~SERIES1) SERIES; urgency=low
* New special indexing dialog in GUI
......
......@@ -292,8 +292,8 @@ bool TextSplit::span_is_acronym(string *acronym)
}
// Generate terms from span. Have to take into account the
// flags: ONLYSPANS, NOSPANS, noNumbers
// Generate terms from span. Have to take into account the
// flags: ONLYSPANS, NOSPANS, noNumbers
bool TextSplit::words_from_span(int bp)
{
#if 0
......@@ -307,6 +307,11 @@ bool TextSplit::words_from_span(int bp)
cerr << endl;
#endif
unsigned int spanwords = m_words_in_span.size();
// Not supposed to happen.
if (spanwords == 0 || m_span.size() == 0)
return true;
int pos = m_spanpos;
// Byte position of the span start
int spboffs = bp - m_span.size();
......@@ -392,9 +397,18 @@ inline bool TextSplit::doemit(bool spanerase, int bp)
case '_':
case '\'':
m_span.resize(m_span.length()-1);
// Trim last word in span word array. Pop it if it
// goes to zero. This is not supposed to happen
// because it would probably signal a parser bug, but
// makes sense anyway
if (m_words_in_span.size() &&
m_words_in_span.back().second > m_span.size())
m_words_in_span.back().second > m_span.size()) {
m_words_in_span.back().second = m_span.size();
if (m_words_in_span.back().second <=
m_words_in_span.back().first) {
m_words_in_span.pop_back();
}
}
if (--bp < 0)
bp = 0;
break;
......@@ -404,7 +418,7 @@ inline bool TextSplit::doemit(bool spanerase, int bp)
}
breaktrimloop:
if (!words_from_span(bp)) {
if (m_words_in_span.size() && !words_from_span(bp)) {
return false;
}
discardspan();
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment